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
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature