Thanks Dan,
would it be something like,
Code:
$query = "LOCK TABLES sessionaccounting WRITE";
if (!(@ mysql_query ($query, $connection)))
or die(mysql_error());
$q1= "INSERT into asessionaccounting select * FROM sessionaccounting where UserName = '" . $row['UserName'] . "' ";
$update1 = mysql_query($q1)
or die(mysql_error());
$query = "UNLOCK TABLES";
if (!(@ mysql_query ($query, $connection)))
or die(mysql_error());
I have never used LOCK before and a quick G gave me this.
Edit:
Also found this for locking multiple tables which I think is needed.
LOCK TABLES sessionaccounting WRITE, sessionusers WRITE
These are being locked from WRITE, will that also lock them from deleting?
Thanks
Bookmarks