[PHPLIB] Atomicity From: Shandy Brown (shandyb <email protected>)
Date: 02/28/00

Does anyone know a good way to do an atomic transaction with PHP/MySQL?

I'm using PHPLIB, so if it could be done using a DB class that'd be a bonus.

basically, I have to check if there's room in a queue (a SELECT statement) and
if there is (check done in PHP), add the user to the queue (an UPDATE
statement).

So if customer B did the SELECT statement before customer A had a chance to do
an UPDATE, they could both be added to the queue, thus overflowing it.

-shandy

 --

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Shandy Brown (http://sjbrown.geeky.net)
Inline Internet Systems (http://www.inline.net)

iHTML (http://www.ihtml.com)
iHTML Merchant (http://www.ihtmlmerchant.com)
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.