SA-MP Forums Archive
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: Mysql (/showthread.php?tid=467162)



Mysql - HardRock - 01.10.2013

Код:
>> mysql_query( Connection handle: 1 )

CMySQLHandler::Query(INSERT INTO  'Houses' (ID, Level, Price, Doors, Owner) VALUES(1, 2, 3, 4, 'Test')) - An error has occured. (Error ID: 1064, 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 ''Houses (ID, Level, Price, Doors, Owner) VALUES(1, 2, 3, 4, 'Test')' at line 1)
Код:
format(query, sizeof(query), "INSERT INTO  'Houses' (ID, Level, Price, Doors, Owner) VALUES(1, 2, 3, 4, 'Test')");



Re: Mysql - Misiur - 01.10.2013

You can't use quotes around table names. You have to either remove them, or change them to backticks (`Houses`)