Re: Table locking
| From: | Rosen | Date: | Thu, 08 Jul 2004 23:09:29 +0000 |
| Subject: | Re: Table locking | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-35161@lists.php.net to get a copy of this message | ||
Is thath mean, thath, when one user is addind records to table, and lock
it - when another user is trying to get the max field value for some field,
the script will waiting the first user to unlock table and then to see the
max value of some field in a table ?
"John W. Holmes" <holmes072000@charter.net> wrote in message
news:40EDD2E1.6030508@charter.net...
> Rosen wrote:
>
> > I have the following situation: I have to prevent users to write at the
same
> > time in one table in PHP script.
> > Is there a way the PHP to "understand", thath another user is filling
table,
> > and to wait before begin to fill data?
>
> Most databases have a LOCK command that you can issue. The other scripts
> that end up running at the same time will wait until the lock is released.
>
> --
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> php|architect: The Magazine for PHP Professionals www.phparch.com