Page 1 of 1

Query error

Posted: Fri Nov 12, 2004 8:08 am
by ratamaster
I want to UPDATE a table called "imagen", the values from the column "orden", but I'm making something worng:

Code: Select all

mysql_query("UPDATE imagen SET orden IN(".$losVal.") WHERE PicNum LIMIT 1")
this is the output error:

Code: Select all

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 'IN 9,1 WHERE PicNum LIMIT 1' at line 1
Someone knows how can I fix the query?


Alvaro

Posted: Fri Nov 12, 2004 8:11 am
by kettle_drum

Code: Select all

UPDATE table SET field = 'new value' WHERE some_field = 'some value' LIMIT 1;