[MySQL] Query error
#1

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

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

Thank you very much again, Vince.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)