MySQL syntax - 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 syntax (
/showthread.php?tid=447805)
MySQL syntax -
BigGroter - 01.07.2013
pawn Code:
format(szQuery, sizeof(szQuery), "DELETE FROM `Houses` WHERE `CoX` = %f, `CoY` = %f, `CoZ` = %f", hInfo[i][CoX], hInfo[i][CoY], hInfo[i][CoZ]);
What's wrong with the syntax?

Error:
pawn Code:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' `CoY` = -282.809997, `CoZ` = 14.000000' at line 1 (error ID: 1064)
Re: MySQL syntax -
Kirollos - 01.07.2013
, should be AND
i.e
Code:
DELETE from foo where something = 'das' AND owner = 1 AND password = 'afs'
==
pawn Code:
format(szQuery, sizeof(szQuery), "DELETE FROM `Houses` WHERE `CoX` = %f AND `CoY` = %f AND `CoZ` = %f", hInfo[i][CoX], hInfo[i][CoY], hInfo[i][CoZ]);