Mysql DB not registering player accounts - 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 DB not registering player accounts (
/showthread.php?tid=303644)
Mysql DB not registering player accounts -
FreedomtoLive - 14.12.2011
Query[100],
EscPass[30],
EscName[MAX_PLAYER_NAME];
mysql_real_escape_string(pName(playerid), EscName);
mysql_real_escape_string(inputtext, EscPass);
format(Query, sizeof(Query), "INSERT INTO `users` (`User`, `Password`) VALUES ('%s', md5('%s'))", EscName, EscPass);
mysql_query(Query);
Won't register accounts into the database, even though in game it says I am registered?
Any solutions? thanks
Re: Mysql DB not registering player accounts -
-Prodigy- - 14.12.2011
Try increasing the array size. Mainly "Query". Turn on mysql_debug() and check for errors.
Re: Mysql DB not registering player accounts -
FreedomtoLive - 14.12.2011
Already tried that? Works on home Mysql but via KingJ it does not seem to register
Re: Mysql DB not registering player accounts -
Vince - 14.12.2011
What does the mysql_debug say? It appears that you haven't set up your table correctly and that the mysqld gives an error.
Re: Mysql DB not registering player accounts -
FreedomtoLive - 14.12.2011
An error has occured. (Error ID: 1364, Field 'Kills' doesn't have a default value)
Only error in mysql debug
Re: Mysql DB not registering player accounts -
Mean - 14.12.2011
I suppose you're saving kills without a value, and in phpmyadmin there is no default value for kills.
I am not sure, I haven't seen your code fully.
Re: Mysql DB not registering player accounts -
Andrɘ - 14.12.2011
Problem is fixed.