I cannot lock MySQL tables with this query:
DB::statement('LOCK TABLES imports WRITE');
He gives the following exception:
[Illuminate\Database\QueryException]
SQLSTATE [HY000]: General Error: 2014 Unable to execute queries while other unbuffered queries are active. Consider using PDOStatement :: fetchAll (). Also, if your code is only ever to run with mysql, you can enable query buffering by setting the PDO :: MYSQL_ATTR_USE_BUFFERED_QUERY attribute. (SQL: LOCK TABLES imports WRITE)
The same thing happens when using PDO.
How should I use this?
source share