MySQL and row locking
Posted: Wed Jul 28, 2004 3:49 pm
Hello,
I have a table where data can be changed by a call center agent as well as from a user who my want to change his/her data.
To avoid any collisions, the table row being changed or updated must be locked and my only be change by the "owner"? How do I realize this?
A extra field in my table row which marks a flag. So when a cca logs in and changes something I write 1 into the field. If a user logs in and wants to change something I write a 2 into the field. A 0 means this row is free and has no owner.
Or is there a mysql method I could use?
Thanks!
I have a table where data can be changed by a call center agent as well as from a user who my want to change his/her data.
To avoid any collisions, the table row being changed or updated must be locked and my only be change by the "owner"? How do I realize this?
A extra field in my table row which marks a flag. So when a cca logs in and changes something I write 1 into the field. If a user logs in and wants to change something I write a 2 into the field. A 0 means this row is free and has no owner.
Or is there a mysql method I could use?
Thanks!