MySQL Forums
Forum List  »  Newbie

Select and update at the same time (with selected value)?
Posted by: Kevin K
Date: June 12, 2010 08:52PM


I am trying to select and update a row at the same time and trying to accomplish these two queries simultaneously.

select * from pool_process where any="1" and status="" order by id asc limit 1;
update pool_process set status = "RUNNING", proc_srv="$server_id" where id="$row->{id}";

id Is the auto_increment column from pool_process.


Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.