Bugged - 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: Bugged (
/showthread.php?tid=488281)
Bugged -
COL - 17.01.2014
fixed
Re: Bugged -
IPrototypeI - 17.01.2014
Quote:
Originally Posted by COL
there is a bug that i have no idea how i can fix it
the bug i can login with different password to other people account, how i could fix that problem
|
I hope you know that mysql_num_rows( ) returns the number of results and if there is no result it returns zero.
Now look at your if-statement
pawn Код:
if ( mysql_num_rows( ) != 1 )
Yes there is something wrong you have to change the 1 to 0 or you can use == instead of != .
A little trick use LIMIT 1 behinde your sql-command that make your query faster and if you use
the r6 plugin from blueG then you can use even mysql_format and the placeholder %e to escape strings.
Re: Bugged -
COL - 17.01.2014
i have changed it to 0 and changed != to == and i still can login with different password D: