mysql_query("LOCK TABLE table WRITE"); // you might think it here mysql_query("LOCK TABLE table READ, table AS t2 WRITE"); // <- but the error is here mysql_query("LOCK TABLES table READ, table as t2 WRITE"); // <- ...and here.
You cannot acquire multiple locks for the same table without imposing them on aliases. Read the manual .
source share