| | |
Simultaneous Data Update - "Record Locking"
Please support our ColdFusion advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
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?
How do I prevent users overwriting each others' updates? Is something like <cflock> useful in this case or is it purely an SQL thing?
Thanks!
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?
How do I prevent users overwriting each others' updates? Is something like <cflock> useful in this case or is it purely an SQL thing?
Thanks!
Last edited by SQL_n00b; Sep 11th, 2009 at 10:46 am.
![]() |
Similar Threads
- update student record (PHP)
- Updating MySQL ... tricky (PHP)
- ";:<script><html>< // >@@#"; (PHP)
- it's me again, I have a problem with this "mini-CMS" I am buidling, images dont UPDAT (PHP)
- Help with automatic update problem and more (Viruses, Spyware and other Nasties)
- "Virus Alert!" In Taskbar, Hijackthis log included (Viruses, Spyware and other Nasties)
- how to make a latest data appear after update it using an upadate button? (VB.NET)
- FlexGrid issue and error "Invalid Row value".... (Visual Basic 4 / 5 / 6)
- need to update each records after record deleted (PHP)
- Record Locking in VB through DAO via MS Access (Visual Basic 4 / 5 / 6)
Other Threads in the ColdFusion Forum
- Previous Thread: CFGrid and checkboxes
- Next Thread: CFQUERY
| Thread Tools | Search this Thread |





