ON DUPLICATE KEY UPDATE Problems [mySQL]
#1

How do you work "ON DUPLICATE KEY UPDATE" Properly? I think i have it right but giving errors.

Error in mysql_debug..
Код:
(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 'SET `pies` = 1 WHERE Username = '[BOT]Jenkins'' at line 1)
And the code causing the error.

pawn Код:
format(Queryy, sizeof(Queryy), "INSERT INTO `piecount` (Username,`%s`) VALUES ('%s',1) ON DUPLICATE KEY UPDATE piecount SET `%s` = 1 WHERE Username = '%s'",name,Pname,name,Pname);
Any idea on causing this?
Reply


Messages In This Thread
ON DUPLICATE KEY UPDATE Problems [mySQL] - by DiddyBop - 02.09.2010, 19:47
Re: ON DUPLICATE KEY UPDATE Problems [mySQL] - by Vince - 02.09.2010, 20:38
Re: ON DUPLICATE KEY UPDATE Problems [mySQL] - by DiddyBop - 02.09.2010, 20:43

Forum Jump:


Users browsing this thread: 2 Guest(s)