SA-MP Forums Archive
MySQL logging in problem - 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 logging in problem (/showthread.php?tid=316699)



MySQL logging in problem - suhrab_mujeeb - 08.02.2012

nvm fixed it, thanks to thekiller. Happened due to a small string size.


Re: MySQL logging in problem - T0pAz - 08.02.2012

pawn Код:
format(query, sizeof(query), "SELECT * FROM `playerdata` WHERE user = '%s'", pName);



Re: MySQL logging in problem - suhrab_mujeeb - 08.02.2012

Quote:
Originally Posted by T0pAz
Посмотреть сообщение
pawn Код:
format(query, sizeof(query), "SELECT * FROM `playerdata` WHERE user = '%s'", pName);
And?


Re: MySQL logging in problem - T0pAz - 08.02.2012

Quote:
Originally Posted by suhrab_mujeeb
Посмотреть сообщение
And?
That's should fix the problem if you have a valid mysql connection and your registration system also hashing the password as whirlpool.


Re: MySQL logging in problem - [HiC]TheKiller - 08.02.2012

Print the query in the dialog and see if it's actually printing the right values. Make sure that in your database, you have a field large enough (130+ chars) and also, don't escape the inputtext as when the whirlpool hashes it, it will take all the bad characters out anyway.

If the problem persists, put mysql_debug under OnGameModeInit or OnFilterScriptInit and paste your mysql log file in your server directory.