error 1100
| From: | Chris Barnes | Date: | Mon, 25 Nov 2002 18:20:48 +0000 |
| Subject: | error 1100 | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-23654@lists.php.net to get a copy of this message | ||
Hi people,
I dont know why but am stuck trying to debug this problem. I keep
getting error number 1100 (Table 'jobs' was not locked with LOCK TABLES)
from PHP when i try querying a mysql database. It has me stumped because
I am using the LOCK TABLES statement when locking the tables...but maybe
there is something wrong with my code that i cant see...
Here is the function i use to lock/unlock the table(s). I call this
function before querying the database. $dblink is the MySQL Link
Resource, $table is the table to lock, $grant describes how it should be
locked (READ/WRITE), if $table or $grant are null then it assumes the
tables are to be unlocked:
function lock($dblink,$table,$grant){
//function to lock/unlock tables
if(($table == null) or ($grant == null)){
$unlock = @mysql_query("UNLOCK TABLES",$dblink);
return $unlock;
}
else{
$lock = @mysql_query("LOCK TABLES " . $table . " " . $grant,$dblink);
return $lock;
}
}
Any ideas?
Thanks heaps :)
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc