Re: viewing records
| From: | Hugh Bothwell | Date: | Fri, 05 Apr 2002 13:45:48 +0000 |
| Subject: | Re: viewing records | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-18245@lists.php.net to get a copy of this message | ||
> he will have access to the first record, which I'm
> displaying in a form. My question is: can another user
> view the same record at the same time?
It depends entirely on where and how you get the
data. Of itself, there is nothing to prevent the same
record being displayed to any number of users.
> if the answer is yes, is there any
> way to prevent this?
It is possible, but I am not at all certain it is the
right thing to do... I would be more concerned
about data corruption, and a better way to prevent
that is to keep a copy of the original data and
compare it to the 'official' version before updating.
This way, any number of people can view the
record, but only one can update it; anyone who
tries updating it after that can be warned and
prompted to modify their own data appropriately.
This also avoids problems with people locking records
and then leaving, or leaving their browser at the page for
6 or 8 hours during which time no-one else can access
that record.