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
Yes you seem to have it figured out, just do the lock in
a normal mysql_query, following the MySQL manual for syntax,
and you can release a lock whenever you want, but the
rule is the sooner the better, since if more then one page
or query tries to do a write, while you have it locked it
has to
2 matches
Mail list logo