mysql - Select rows from database then change a value in a column -
i'm using following query:
select id,link,size files status='-1' order id desc limit 10
then want change 'status' column values of selected rows -2, possible combine 'select' , 'update' functions in same query don't have query database again?
you not need combine select update: try:
update files set status='-2' status='-1' order id desc limit 10;
the fields names irrelevant here.
Comments
Post a Comment