MySQL Forums
Forum List  »  Newbie

Re: Select and update at the same time (with selected value)?
Posted by: Barry Galbraith
Date: June 28, 2010 11:13PM

Quote

UPDATE ... LAST_UPDATE_ID(id);
I was just going to say that!
UPDATE locks the row it selects so it can write to it, then unlocks it.
That'll stop another server getting the same row.

Good luck,
Barry.

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.