why wont this sql query work?

Red Squirrel

No Lifer
May 24, 2003
70,592
13,807
126
www.anyf.ca
Using mysql/php and this query refuses to work. I really can't see whats wrong with it.

UPDATE contentdb_recipeentry set rrare=1, set ramt=525 WHERE raid=10 AND ring=6 LIMIT 1;

The error is:

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 ramt=525 WHERE raid=10 AND ring=6 LIMIT 1' at line 1


The schema of that table is as follows:


CREATE TABLE `contentdb_recipeentry` (
`raid` bigint(20) NOT NULL,
`ring` bigint(20) NOT NULL,
`rrare` tinyint(4) NOT NULL,
`ramt` bigint(20) NOT NULL,
KEY `raid` (`raid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
Only one SET keyword is needed.

UPDATE contentdb_recipeentry set rrare=1, ramt=525 WHERE raid=10 AND ring=6 LIMIT 1;