MySQL syntax
#1

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)
Reply
#2

, 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]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)