[MySQL] INSERT query giving error with Whirlpool - 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] INSERT query giving error with Whirlpool (
/showthread.php?tid=421585)
[MySQL] INSERT query giving error with Whirlpool -
emokidx - 10.03.2013
So my code is giving error whenever I try to insert a query with password hashed with Whirlpool.
Код:
[10:00:14] ProcessQueryThread(RegPlayer) - Executing query INSERT INTO `users` (`username`, `password`, `money`, `ip`) VALUES('hue', 'FD9D94340DBD72C11B37EBB0D2A19B4D05E00FD78E4E2CE8923B9EA3A54E900DF181CFB112A8A73228D1F3551680E2AD9701A4FCFB248FA7FA77B9518062...
[10:00:14] ProcessQueryThread(RegPlayer) - Error will be triggered to OnQueryError().
Код:
[10:03:47] ProcessQueryThread(RegPlayer) - Executing query INSERT INTO `users` (`username`, `password`, `money`, `ip`) VALUES('hue', '123456', 0, '127.0.0.1')...
[10:03:47] ProcessQueryThread(RegPlayer) - Query was successful.
[10:03:47] ProcessQueryThread(RegPlayer) - Data being passed to ProcessTick().
pawn Код:
WP_Hash(buf, sizeof(buf), inputtext);
format(query, sizeof(query), "INSERT INTO `users` (`username`, `password`, `money`, `ip`) VALUES('%s', '%s', 0, '%s')", GetPnameid(playerid), buf, PlayerInfo[playerid][Ip]);
print("derp");
mysql_function_query(conhandle, query, false, "RegPlayer", "i", playerid);
print("derp2");
pawn Код:
public RegPlayer(playerid)
{
PlayerInfo[playerid][SQLid] = mysql_insert_id();
print("derp3");
return 1;
}
Side Note: The third print doesn't work with Whirlpool.
Re: [MySQL] INSERT query giving error with Whirlpool -
GWMPT - 10.03.2013
What's the size of the var: query?
Re: [MySQL] INSERT query giving error with Whirlpool -
emokidx - 12.03.2013
Quote:
Originally Posted by klklt0
What's the size of the var: query?
|
It was 200, thanks.