SA-MP Forums Archive
Description: Field 'Ammo1' doesn't have a default value (index 0). Query: - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Description: Field 'Ammo1' doesn't have a default value (index 0). Query: (/showthread.php?tid=596070)



Description: Field 'Ammo1' doesn't have a default value (index 0). Query: - Bumie - 12.12.2015

Yesterday, I added 8 field to Navicat, That is 'Ammo1' 'Ammo2' ... 'Ammo8'.
And I login to server, It's OK. No error.
But when someone login account, they enter the password to register. In server_log.txt there appear this error. And the player who want to register is fail. they can't register a new account. Some account already have in mysql before still login in the game.
PHP код:
[10:11:17] [MySQLQuery Error - (ErrorID1364) (Handle1)
[
10:11:17] [MySQLCheck mysql_log.txt to review the query that threw the error.
[
10:11:17Dumping query from 2015/12/12 (10:11:17)
DescriptionField 'Ammo1' doesn't have a default value (index 0). Query:
[10:11:17] INSERT INTO `accounts` (`RegiDate`, `LastLogin`, `Username`, `Key`) VALUES (NOW(), NOW(), '
Scripter_test','C3C1A3F2745763DACE41C90110C22D2415E89F4FED66E43977DACBC9B5BDC4A0629BC471D06058A298F08765B0AD8574589E981098659B60F96DD72C0E62C524') 



Re: Description: Field 'Ammo1' doesn't have a default value (index 0). Query: - FreAkeD - 12.12.2015

Use a tool like phpmyadmin to run a query that assigns a default value to the column. I believe that's the problem you're having. This solution will fix it.


Re: Description: Field 'Ammo1' doesn't have a default value (index 0). Query: - Bumie - 20.12.2015

Quote:
Originally Posted by FreAkeD
Посмотреть сообщение
Use a tool like phpmyadmin to run a query that assigns a default value to the column. I believe that's the problem you're having. This solution will fix it.
What do you means ? I can't catch it