On Mon, Nov 17, 2003 at 11:06:39PM -0600, David Dice wrote:
> I'm a newbie to MySQL so if this is a common question, forgive me, but I can't find 
> an answer.
> 
> How do I prevent data collision in the following scenario:
> User A and User B are examining the same data (say a customer's name and address).  
> User A modifies something (say the customer's phone number) and saves the 
> transaction.  User B modifies something different at the same time.  How can I 
> prevent User B's modification from being saved?

Under MySQL, you can lock the a table during sensitive transactions.
If you're using InnoDB tables, you can use row locking.

  <http://www.mysql.com/doc/en/Locking_methods.html>

> This is a database I'm converting from Foxpro, and there I would have just told User 
> B that User A had the data open, and prevented them from editing it.  I'm sure 
> there's a better way.  Thanks for your advice.
> 
> David Dice

-- 
Brian 'you Bastard' Reichert            <[EMAIL PROTECTED]>
37 Crystal Ave. #303                    Daytime number: (603) 434-6842
Derry NH 03038-1713 USA                 BSD admin/developer at large    

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to