On Wed, Nov 13, 2002 at 15:26:42 -0700, "scott.marlowe" <scott.marlowe@xxxxxxx> wrote: > > Oh, I just thought of the better way than locking the whole table is to > use a "select for update" on the row you want to lock. I think that'll do > what you want and without locking the whole table. Of course, 20 lines of > PHP code runs pretty fast, so unless you're handling lotsa traffic locking > the table probably works fine too. This came up in a discussion recently and it really isn't better. If you do this you have to worry about the select for update returning zero rows (even with the limit 1 clause) and retry the query if it does.