SA-MP Forums Archive
[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=377011)



[MySQL] Query error - vIBIENNYx - 12.09.2012

Okay, this is my Query:

pawn Код:
UPDATE `playerinfo` SET `lastloginip`, `lastlogindate` VALUES '81.159.188.82', 'UTC_TIMESTAMP()' WHERE `username` = 'Ben_Karner'
I tested it using the mysql query function and this is the outcome:

pawn Код:
#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 ' `lastlogindate` VALUES '81.159.188.82', 'UTC_TIMESTAMP()' WHERE `username` = 'B' at line 1
Any help would be appreciated.


Re: [MySQL] Query error - Vince - 12.09.2012

Syntax for update queries is:
PHP код:
UPDATE table SET fielda 'foo'fieldb 'bar' WHERE a b
Also, functions needn't be wrapped in quotes.


Re: [MySQL] Query error - vIBIENNYx - 12.09.2012

Thank you very much again, Vince.