SA-MP Forums Archive
MySQL register bug/error - 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: MySQL register bug/error (/showthread.php?tid=607233)



MySQL register bug/error - iDomo - 16.05.2016

I can join the server which I have portfowarded temporarily for now, uploaded the DB and connected the MySQL DB to the script. Whenever I log off, the account is not saved in the DB.


I checked my MySQL log and found this:

Код:
[22:20:13] [ERROR] CMySQLQuery::Execute[()] - (error #1364) Field 'banned' doesn't have a default value
[22:22:31] [ERROR] CMySQLQuery::Execute[OnServerSetItem(iii)] - (error #1364) Field 'active' doesn't have a default value
[22:22:33] [ERROR] CMySQLQuery::Execute[OnServerSetItem(iii)] - (error #1364) Field 'active' doesn't have a default value
[22:28:13] [ERROR] CMySQLQuery::Execute[OnServerSetItem(iii)] - (error #1364) Field 'active' doesn't have a default value
I have little experience with MySQL.


Re: MySQL register bug/error - iDomo - 16.05.2016

Bump. I really need this fixed. I know I need to set default values to 0 but don't know where to.


Re: MySQL register bug/error - Firewire - 16.05.2016

Hello IDomo!

Can you please send a screenshot of your database structure displaying the fields 'banned' and also 'active'.

This happens because the Strict Trans Mode is enabled in your mysql.ini file.

If you look at your table carefully you'll notice that these field names have no default value set, so I suggest editing and setting to 'None'.

Hope all gets resolved,
Firewire.


Re: MySQL register bug/error - iDomo - 16.05.2016

Where can I find these databases in PHPMyAdmin?


Re: MySQL register bug/error - Firewire - 16.05.2016

When your gamemode first initialises it will use a mysql_connect call to a host defined in your gamemode.

Connect to that using the username and password (do not post them in here).

Thanks,
Firewire.


Re: MySQL register bug/error - iDomo - 16.05.2016

I've connected the script to MySQL using PhpMyAdmin. I just don't know where to find these items to set the default value.


Re: MySQL register bug/error - iDomo - 16.05.2016

Okay so I've found banned http://prntscr.com/b4qf5a and active http://prntscr.com/b4qfhm


Re: MySQL register bug/error - Firewire - 16.05.2016

You say you've found them, have you altered the default values of them too?

- Firewire.


Re: MySQL register bug/error - iKevin - 16.05.2016

The last "item" in the line (ex. banned line) is distinct values. Click there and try to make them "None".


Re: MySQL register bug/error - iDomo - 16.05.2016

They're already set on none, so I set them "defined as:0".

Apparently the errors are gone but the rest of the structure is giving me errors about values. Do I need to change them all to 0?