MySQL R6 Error
#1

Hello there,

So I have this little error, crashdetect plugin say that mysql_retrieve_row(); has crashed the script, but when we tested that script on windows home host, it worked fine, but when we uploaded to deluxe host, it crash every time when mysql_retrieve_row is called.

pawn Код:
mysql_retrieve_row();
     new banned[1];
     mysql_get_field("banned", banned);
     PlayerInfo[extraid][pBanned] = bool:strval(banned);
Here is part where it crashes. And here is Query

pawn Код:
format(motd, sizeof(motd), "SELECT * FROM `players` WHERE `displayName` = '%s' LIMIT 1", escapedname);
     mysql_query(motd, EXIST_PLAYER_QUERY, playerid);
So if anyone could help us, that would be awesome.

All regards
Reply
#2

Please guys, is it possible that no one got answer for this question :S
Reply
#3

Although it may not be directly related to your problem, it's still something you might want to correct.

pawn Код:
new banned[1];
     mysql_get_field("banned", banned);
The field 'banned' in your database table might be of an integer data type, but mysql_get_field still returns a string.
Strings are ended by a NULL terminator. Your array cell size (of the variable 'banned') does not allow the NULL terminator to be added.
Reply
#4

i changed type to varchar(2), and still nothing :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)