|List:||MySQL and PHP||« Previous MessageNext Message »|
|From:||Kevin Waterson||Date:||August 6 2007 6:37am|
|Subject:||Prevent Race Condition|
|View as plain text|
Hi all, I wish to get the next id from a field. Currently I can SELECT MAX(id) FROM table but of course, this leads to a race condition with many users. How can I get around this? Do I need to lock the table? Kind regards kevin -- "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote."
|• Prevent Race Condition||Kevin Waterson||6 Aug|
|• Re: Prevent Race Condition||Ulf Wendel||6 Aug|