Re: locking a mysQL row
| From: | nayco | Date: | Tue, 11 Sep 2001 07:14:10 +0000 |
| Subject: | Re: locking a mysQL row | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-66864@lists.php.net to get a copy of this message | ||
Try to insert in your 'locked' field an Unix date .... instead of 'locked' .
One field, two effects !!!!
(°- Nayco,
//\ Nayco@netcourrier.com
v_/_ http://nayco.free.fr
----- Original Message -----
From: Justin French <justin@indent.com.au>
To: php <php-general@lists.php.net>
Sent: Tuesday, September 11, 2001 3:48 AM
Subject: [PHP] locking a mysQL row
> Hi all,
>
> I'm currrently developing a dynamic, user-added content site.
> The thing is, content can be added and edited my TWO people..
> the original writer, and the editor.
>
> So, my problem is, if the editor/user makes an edit to content
> whilst the other is also attempting to do so, one of them will
> get overwritten.
>
>
> This isn't the end of the world, but it's a bit of a problem
> i'd like to clear up.
>
>
> So, my initial thought was to add a new column to the code
> "locked" with a time that the code can be re edited.
>
> 1. when the user requests to edit the content, the
> program first makes sure any "locked" time has
> expired.
>
> 2. he/she is given a time limit (say 10 minutes) to
> edit and re-submit, during which time the annother
> user cannot edit or change the content.
>
> 3. when the user submits the edited content, the
> locked timestamp is deleted, so that the content
> can be re-edited earlier than the 10 minutes.
>
> 4. if the user submits after the 10 minutes, they
> are rejected, since the content may have been
> edited by annother user.
>
>
> Does this seem like a good move? Can any one offer any firther
> tips or a smarter way to do this?
>
>
>
> Thanks
> Justin French
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>