Re: lock table problems

From: Date: Tue, 08 Aug 2000 21:06:35 +0000
Subject: Re: lock table problems
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-10791@lists.php.net to get a copy of this message
Mark Lo wrote: > > Hi, > > when I exec the script like mysql_query("lock tables table_name read"); > this script locks all of the tables under the same database. Can anyone point me out please!!! > > Thank You so much > > Mark No it does not. It only locks the tables you tell it to lock. You can only access tables you locked until you unlock the tables. This prevents deadlocks. If you intend to access table2 while table1 is locked, you must lock them both "lock tables table1 read, table2 read" Please read the manual!

« previous php.general (#10791) next »