mysql lock
| From: | anders thoresson | Date: | Fri, 27 Jun 2003 06:03:49 +0000 |
| Subject: | mysql lock | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-28939@lists.php.net to get a copy of this message | ||
Hi,
I've never used a lock on a MySQL table so far, but need one now. Two questions:
1. Do I set the lock by a normal query, but in the form of "LOCK TABLE <tablename> WRITE", instead of "SELECT * FROM <tablename> WHERE x = 1"?
2. Can I set the lock in one query, then perform multiple other queries on the table, in between which I do some PHP work, and then release the lock several queries and lines of PHP code later?
--
anders thoresson