[ MySQL ] Query Error - 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 ] Query Error (
/showthread.php?tid=661967)
[ MySQL ] Query Error -
IdonTmiss - 20.12.2018
// Fixed thanks
Re: [ MySQL ] Query Error -
StRaphael - 20.12.2018
Try:
PHP код:
mysql_format(SQL, query, sizeof query, "UPDATE `%s` SET `%s`='%d' WHERE `%s`='%d'", table, column, sqlID, sqlid);
Re: [ MySQL ] Query Error -
Banditul18 - 20.12.2018
PHP код:
mysql_format(SQL, query, sizeof query, "UPDATE `%s` SET `%s`='%d' WHERE `%s`=%d", table, column, value, sqlID, sqlid);
You forgot to pass the value that you wanted to be updated
Quote:
Originally Posted by StRaphael
Try:
PHP код:
mysql_format(SQL, query, sizeof query, "UPDATE `%s` SET `%s`='%d' WHERE `%s`='%d'", table, column, sqlID, sqlid);
|
That does same thing but worst, it will not gonna use the index for the sqlID so it makes it a bit slower
Re: [ MySQL ] Query Error -
sammp - 20.12.2018
Код:
mysql_format(SQL, query, sizeof(query), "UPDATE %s SET %s=%d WHERE %s=%d", table, column, value, sqlID, sqlid);
mysql_tquery(SQL, query);
Re: [ MySQL ] Query Error -
IdonTmiss - 20.12.2018
I'm retarted I had a missing parametar...