potpot
07-16-06, 10:43 PM
i have this query on my php script:
UPDATE uw_content SET content_order='2' WHERE content_id='1'
UPDATE uw_content SET content_order='1' WHERE content_id='2'
but i have problem, when i try to manually paste this to sql editor i got this error:
Error Code : 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 'UPDATE uw_content SET `content_order`='1' WHERE `content_id`='2
(0 ms taken)
and when i execute this script the table result is this :
the content order would be
3
1
1
4
the original one is:
1
2
3
4
and am trying to swap the 1 to 2, but when the script executes i got the result of:
3
1
1
4
any ideas guys?? thank you..
UPDATE uw_content SET content_order='2' WHERE content_id='1'
UPDATE uw_content SET content_order='1' WHERE content_id='2'
but i have problem, when i try to manually paste this to sql editor i got this error:
Error Code : 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 'UPDATE uw_content SET `content_order`='1' WHERE `content_id`='2
(0 ms taken)
and when i execute this script the table result is this :
the content order would be
3
1
1
4
the original one is:
1
2
3
4
and am trying to swap the 1 to 2, but when the script executes i got the result of:
3
1
1
4
any ideas guys?? thank you..