> 1. Jack opens record A to change an entry.
> 2. Jill opens record A to change an entry.
> 3. Jack finishes his changes and saves the data.
> 4. Jill finishes her changes and saves the data.

Well, if you only update the fields that changed then who cares?  The
fields that Jill changes are going to overwrites Jack's changes anyway.
Locking the record and having Jack finish before Jill can start isn't
going to change the end result which would be that Jill's changes are
going to overwrite Jack's.

> Jill just over wrote whatever Jack did.  The only method I could think of to
> prevent this was to have the client check to see if the record was allready
> being edited by someone.  If it is then they have to wait.   Is there
> another way to do this?   What are atomic updates??

ie. update foo set field=field+1 where id=47

An increment of the field column guaranteed to happen in one operation
such that two such increments happening concurrently will not interfere
with each other.

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to