Re: [PHP-DB] Table locks

2003-08-05 Thread John W. Holmes
John W. Holmes wrote:

Tim Best wrote:

Anyone know how you set a lock in a MySQL table using PHP?

I tried:

$select = ³LOCK TABLES t1 WRITE;²;
$select .= ³select * from t1;²;
$select .= ³UNLOCK tables;¹;
When I run mysql_db_query(³db²,$select,$conn);  it always returns 
nothing.
Any insights would be appreciated!


Run one query at a time.

and don't use mysql_db_query(), use mysql_select_db() and mysql_query()...

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals – www.phparch.com





--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Table locks

2003-08-05 Thread John W. Holmes
Tim Best wrote:

Anyone know how you set a lock in a MySQL table using PHP?

I tried:

$select = ³LOCK TABLES t1 WRITE;²;
$select .= ³select * from t1;²;
$select .= ³UNLOCK tables;¹;
When I run mysql_db_query(³db²,$select,$conn);  it always returns nothing.
Any insights would be appreciated!
Run one query at a time.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals – www.phparch.com





--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php