Results 1 to 2 of 2
Thread: MySQL lock issuess
Apr 15, 2002, 16:51 #1
- Join Date
- Jul 2000
- 0 Post(s)
- 0 Thread(s)
MySQL ----> lock issues :(
I have a script that views the details of a meeting: subject, agenda (as text type).. and minutes (again as text type). Right next to the header: Agenda, I have two links (edit | remove). If you click on edit, the page refreshes and you get a form text area with the previous text already in for you to make your updates.
Problem is, of course, if two people are clicking on edit at the same time, and if I am not issuing a LOCK on that table when the pages refreshes, then after the second person submits changes, data in the databse will not be actual.
One solution, is to lock the table as the page refreshes meaning, the first person is in control of the Agenda text, while the 2nd person will get a database query error and will have to wait until the 1st person submits changes.
Problem : what if the first person takes a long time to update the Agenda. And what if he just leaves the building...
Pleas ehelp with a suggestion on how to tackle this lock problem. (I also noticed MySQL is not supporting locking ONE table only!!, it would lock the whole database for me...)
Thanks a bunch!
Last edited by Raioo; Apr 15, 2002 at 19:14.I appreciate the help of everyone at SitePoint.com