[snip]
> [snip]
> is there a way I can get a number and increment it all in one query
> then?
> [/snip]
>
> UPDATE tblFoo SET value = (value+1) WHERE conditions
>

Hmm.. my bad - I get that bit, but can I do:

SELECT value WHERE conditions UPDATE tblfoo SET value= (value+1)
[/snip]

Essentially that is what the UPDATE statement is doing, you are
selecting values to be updated with the where condition. Your way is two
queries The SELECT (which locks, then releases) and the UPDATE (which
locks, the releases). In the split second between the select and update
the row is not locked, an undesirable conditions.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to