Re: lock tables problem

From: Date: Tue, 08 Aug 2000 19:28:02 +0000
Subject: Re: lock tables problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-10767@lists.php.net to get a copy of this message
You shouldnt have to, mysql will automagically lock and unlock them when doing an insert/update. On Wed, 9 Aug 2000, Mark Lo wrote: > Hi, > > I need to lock the tables because I need inserting and updating later. > > like ....<form action="inserting.php" method="post">...i will do the > insserting once i hit the submit button.... > > Any Ideas of how to lock a specific table. > > Thank You > > Mark > > > ----- Original Message ----- > From: Chris Murley <murley@appindex.net> > To: Mark Lo <markloky@netvigator.com> > Cc: php general <php-general@lists.php.net>; <mysql@lists.mysql.com> > Sent: Wednesday, August 09, 2000 3:22 AM > Subject: Re: [PHP] lock tables problem > > > > Why would you need to lock the table to do a select? > > > > > > mysql usually only locks when inserting/updateing? > > > > > > > > On Wed, 9 Aug 2000, Mark Lo wrote: > > > > > Hi, > > > > > > my script is as follows (once I lock the table1, i won't be able to > read table2) > > > what is the problems; > > > > > > require("Password.hlh"); > > > mysql_select_db("database1"); > > > mysql_query("lock tables table1 read"); > > > $query="select * from table1"; > > > > > > > > > then---the problem starts here... > > > > > > require("Password.hlh"); > > > mysql_select_db("database1"); > > > mysql_query("lock tables table2 read"); > > > $query="select * from table2"; > > > > > > ---unable to select from table2--- > > > > > > Can anyone please point me out the problems. > > > > > > Thank you so much > > > > > > Mark > > > > > > > >

« previous php.general (#10767) next »