Problem MySQL - 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: Problem MySQL (
/showthread.php?tid=605574)
Problem MySQL -
Belengher - 21.04.2016
Hi, SA-MP!
Soon I see erroarea in mysql_log! I do not know how to solve.
error:
Quote:
mysql_format ERROR no value for specifier "%d" available
|
Re: Problem MySQL -
zPain - 21.04.2016
The message is pretty clear. You didn't specify what %d is.
Example:
PHP код:
new value = random(1000);
PHP код:
mysql_format(connection, query, sizeof query, "UPDATE table SET field=%d"); // Incorrect
mysql_tquery(connection, query);
PHP код:
mysql_format(connection, query, sizeof query, "UPDATE table SET field=%d", value); // Correct
mysql_tquery(connection, query);