Reputation: 694
Hi i cant figure out this.. i even try direct in phpmyadmin
this query is not working
UPDATE orsil_quote SET status=4 WHERE order=199
Direct on Php Myadmin i get MySQL said: #1064 (syntax error around order=199)
I have tried
UPDATE orsil_quote SET status=`4` WHERE order=`199`
UPDATE `orsil_quote` SET status=4 WHERE order=199
UPDATE `orsil_quote` SET status=`4` WHERE order=`199`
UPDATE orsil_quote SET status='4' WHERE order='199'
UPDATE 'orsil_quote' SET status=4 WHERE order=199
UPDATE 'orsil_quote' SET status='4' WHERE order='199'
UPDATE orsil_quote SET status="4" WHERE order="199"
UPDATE "orsil_quote" SET status=4 WHERE order=199
UPDATE "orsil_quote" SET status="4" WHERE order="199"
I can confirm the column orsil_quote does exists, also column status and column order, all of them exists and the name has been checked hundred times.
What is happening!!
Upvotes: 0
Views: 31
Reputation: 219934
ORDER
is a reserved MySQL keyword. If you are going to use it as a column identifier you must wrap it in ticks:
UPDATE `orsil_quote` SET `status`=4 WHERE `order`=199
Although it would be better to alter your table and not use a reserved keyword as a column identifier.
Upvotes: 3