Re: Table locking

From: Date: Sat, 10 Jul 2004 16:19:36 +0000
Subject: Re: Table locking
References: 1 2 3 4 5 6 7  Groups: php.db 
Request: Send a blank email to php-db+get-35187@lists.php.net to get a copy of this message
Rosen wrote:
I need to be sure, thath nobody else will can write on some tables until I don't append obout 4-500 records in these tables. But until now I never used table locking in MySQL and I didn't found information about this ( like examples ).
You could try a multi insert syntax such as INSERT INTO yourtable (a,b,c) VALUES (1,2,3),(4,5,6),(7,8,9); which will insert three rows into the table. Couldn't confirm in the manual, but this INSERT should run completely before anything else does. I still have to question _why_ another INSERT in the middle of your insertion will mess things up. Sounds like the problem is there.
Is there a problem with locking if PHP uses same user&pass for all users in database ?
No. The LOCK is on a per connection basis and is not tied to the username and/or password. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.db (#35187) next »