RE: [PHP-DB] DB Access, Sessions and Blocking Access

From: Date: Thu, 18 Aug 2005 00:34:04 +0000
Subject: RE: [PHP-DB] DB Access, Sessions and Blocking Access
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-40101@lists.php.net to get a copy of this message
Bret Can you figure out how many minutes the average userwould take for an update/edit function? You could then write a CRON script to reset those accounts after some predetermined expiry time is reached. Another option is to timestamp when the user requests the record and when it gets updated...if the update timestamp is before the request timestamp and the requestor id doesn't match the updator id, you know you haven't had the record checked in yet. You can then decide if there was an appropriate delay before issuing out the record to another user for their edit... Bastien
From: Bret Walker <bret-walker@northwestern.edu> To: php-db@lists.php.net Subject: [PHP-DB] DB Access, Sessions and Blocking Access Date: Wed, 17 Aug 2005 17:19:38 -0500 Hello- I'm developing a web-based system whereby users can edit documents and then e-mail the documents to selected recipients. The "documents" are comprised of the data from several MySQL fields. I want to make sure that two people don't edit a document at the same time. My users log in via a script that starts a session. My initial idea was to have a field to denote file access (1 for "in use" 0 for available). The problem with this would be if a user navigates to a different page or closes the browser window without clicking a "save" or "close" button (which would execute a query to set the in_use field to 0). I'm sure others have dealt with the issue of exclusive access to a MySQL resource. I've looked into InnoDB transactional support, but that doesn't seem to be what I need, since I'm not overly concerned about simultaneously access, just simultaneous editing. How can I ensure the "document" isn't accessed by two people at the same time? Thanks, Bret
<< smime.p7s >>


« previous php.db (#40101) next »