On 07/07/2010 11:59 AM, tedd wrote: > Hi gang: > > I have *my way* of handling this problem, but I would like to hear how > you guys do it. > > Here's the problem -- let's say you have a database containing names and > addresses and you want "approved" users to be able to access the data. > As such, a user must login before accessing an editing script that would > allow them to review and edit the data -- nothing complicated about that. > > However, let's say you have more than one user accessing the editing > script at the same time and you want to make sure that any changes made > to the database are done in the most efficient manner possible. > > For example, if two users access the database at the same time and are > editing different records, then there's no real problem. When each user > finishes editing they simply click submit and their changes are recorded > in the database. However, if two (or more) users want to access the same > record, then how do you handle that? > > Cheers, > > tedd I would load up the current db values at the beginning of the edit form and store them in the session. Then on the processing page look them up again and see if they match the session values. If not, then load the edit form again with a message that says the record has recently been updated by someone else. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php