I need to concatenate a file id before insert, thus want to lock a reference table for read and write. How can I do that?
Just locking the table for read, still allows select from that table
$SqlLock2 = "LOCK TABLES TableName t1 READ"; mysql_query($SqlLock2) or die(mysql_error());
// Select something from TableName
$SqlUnlock = "UNLOCK TABLES"; mysql_query($SqlUnlock) or die(mysql_error());