Just wondering if anyone has tried doing quasi application based locking
with PHP? My scenario is this. I'm constructing a database for my
company to help keep track of trouble tickets, etc with a web-based
frontend. I'm using PHP (obviously =]) for inputing/retrieving data and
have a slight predicament. Since MySQL does table-level locking, if I
put lock statements in my queries, it would cause two problems. One
being the entire table being locked and two if the user just closes the
webpage without exiting properly, the table would remain locked
indefinately. So I'm trying to think of alternatives, one of which is
using global variables to store table/record id's, and then evaluating
the queries based on that information. So if John selects ticket # 5 and
might be updating it, then when Bob attempts to select ticket #5, then
the $id and $table variables would be checked against the variables
stored when john placed his query, and bob would get a message saying
that record #5 is locked or in-use by John and to try later. Is this
feasible or is there a better way to do this? Thanks for your time.

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to