Mysql DB not registering player accounts
#1

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
Reply
#2

Try increasing the array size. Mainly "Query". Turn on mysql_debug() and check for errors.
Reply
#3

Already tried that? Works on home Mysql but via KingJ it does not seem to register
Reply
#4

What does the mysql_debug say? It appears that you haven't set up your table correctly and that the mysqld gives an error.
Reply
#5

An error has occured. (Error ID: 1364, Field 'Kills' doesn't have a default value)

Only error in mysql debug
Reply
#6

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.
Reply
#7

Problem is fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)