Mysql
 sql >> Datenbank >  >> RDS >> Mysql

Sperrtabelle zum Lesen und Schreiben

mysql_query("LOCK TABLE table WRITE"); // you might think it's 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.

Sie können nicht mehrere Sperren für dieselbe Tabelle erwerben, ohne sie zu aliasen. Lesen Sie das Handbuch .