Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Locking a table row while web form is open

by eric256 (Parson)
on Dec 22, 2005 at 05:08 UTC ( [id://518475]=note: print w/replies, xml ) Need Help??


in reply to Locking a table row while web form is open

An easier approach is to add two columns. LockedBy and LockedOn. When a user begins an edit, lock the record recording the ID and the Time. When they commit remove the lock. Don't let anyone edit the record if it has a lock, or let them see who locked it when and force remove the lock. This way you can also expire locks that are X minutes old, or when a users session ends, remove all there locks. I've used this approach before and it works rather well.


___________
Eric Hodges $_='y==QAe=e?y==QG@>@?iy==QVq?f?=a@iG?=QQ=Q?9'; s/(.)/ord($1)-50/eigs;tr/6123457/- \/|\\\_\n/;print;
  • Comment on Re: Locking a table row while web form is open

Replies are listed 'Best First'.
Re^2: Locking a table row while web form is open
by graq (Curate) on Dec 22, 2005 at 08:55 UTC

    Do you know what the management loves? They love a little javascript ticker that shows how long until the lock times out - gives the person editing a sense of urgency and when it clicks down to 0 seconds they know they will have to start again...

    Now I find it a naff idea - but I don't pay my wages.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://518475]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-19 01:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found