MySQL Forums :: Newbie :: Select and update at the same time (with selected value)?


Advanced Search

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

Hey!

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.

Thanks,
_Kevin

Options: ReplyQuote


Subject Written By Posted
Select and update at the same time (with selected value)? Kevin K 06/12/2010 08:52PM
Re: Select and update at the same time (with selected value)? laptop alias 06/13/2010 02:15AM
Re: Select and update at the same time (with selected value)? Rick James 06/13/2010 11:33AM
Re: Select and update at the same time (with selected value)? Kevin K 06/17/2010 08:44PM
Re: Select and update at the same time (with selected value)? Barry Galbraith 06/17/2010 09:33PM
Re: Select and update at the same time (with selected value)? Kevin K 06/28/2010 12:19AM
Re: Select and update at the same time (with selected value)? Barry Galbraith 06/28/2010 03:54PM
Re: Select and update at the same time (with selected value)? Kevin K 06/28/2010 09:41PM
Re: Select and update at the same time (with selected value)? Rick James 06/28/2010 11:09PM
Re: Select and update at the same time (with selected value)? Barry Galbraith 06/28/2010 11:13PM
Re: Select and update at the same time (with selected value)? Kevin K 06/30/2010 09:49PM
Re: Select and update at the same time (with selected value)? LAST_INSERT_ID Rick James 06/30/2010 11:14PM
Re: Select and update at the same time (with selected value)? LAST_INSERT_ID Barry Galbraith 06/30/2010 11:40PM
Re: Select and update at the same time (with selected value)? LAST_INSERT_ID Rick James 07/01/2010 10:10PM


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.