how to use the lock tables function

From: Date: Wed, 09 Aug 2000 13:16:09 +0000
Subject: how to use the lock tables function
Groups: php.general 
Request: Send a blank email to php-general+get-10914@lists.php.net to get a copy of this message
Hi, I would like to know what does thread mean in MySql. and how does the lock tables functions. For an example below. mysql_pconnect("xxx","xxx","xxx"); mysql_select_db("database1"); mysql_query("lock tables table1 read");-----lock tables here $query="select something from table1"; $resutl=mysql_query($result); mysql_pconnect("xxx","xxx","xxx); ----same user connect again--?????unlock mysql_select_db("database1"); mysql_query("select something from table1"); mysql_query("unlock tables"); -------?????unlock I would like to know when will the table be unlocked. is it unlocked at the second mysql_pconnect or at when i issues the unlock tables command. Assume the above is in one script(without disconnected from the server). Thank you Mark Lo

« previous php.general (#10914) next »