Not quite sure whether this is a question for the server side programming forum or for SQL forum. Nevertheless, here it is:
What is the best way to update a record when 2 users of my site happen to edit it simultaneously?
For example, assume the following scenario:
Let's say users John Doe and Jane Doe log into my site and happen to view the below record simultaneously.
---------------------------------------------------------------------------------
Bruce Wayne | Gotham City | (910)000-0000
---------------------------------------------------------------------------------
If John edits the above phone number to (910)000-0001 and Jane changes it to (910)000-0002 - at the same time - what value do I update the DB with?
And how do I prevent users overwriting each others' updates?
Thanks!