update query in simple table
hi.. i need help in update query..i want to update the table rows , the data is comng from database ,i used php for that. db is mysql.. according to my requirement i want to use two buttions for move up and move down , both should take place simutaneously. when i press move up button, one value should go up nd that correspondng value should move down. so for that i neeed to write a update query in the same table.. is it possible to write two update queries in same table.. it looks silly question.. but some one help me..
my querys is:
update menureg set order=order+1 where menuid=id..
and other query update menureg set order=order-1 where menuid=id..
please help me. both should take place togeher..
UPDATE menureg SET order=order+1 WHERE menuid=id1;
UPDATE menureg SET order=order-1 WHERE menuid=id2;
ok.. thanks for the reply but how to implement it with php. i mean i am askng bout the execution..bcoz exection is important wth mysql_query
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)