Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php PDO exec()和无缓冲查询_Php_Mysql_Sql_Pdo_Laravel 4 - Fatal编程技术网

Php PDO exec()和无缓冲查询

Php PDO exec()和无缓冲查询,php,mysql,sql,pdo,laravel-4,Php,Mysql,Sql,Pdo,Laravel 4,我有几个触发器是使用PHPPDO执行的。 我使用的是Laravel框架 我正在使用安装了最新Xampp的solydK操作系统。触发器出现以下错误: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider usi

我有几个触发器是使用PHPPDO执行的。 我使用的是Laravel框架

我正在使用安装了最新Xampp的solydK操作系统。触发器出现以下错误:

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.' 
经过一些调整后,我尝试使用
PDO::exec()
执行查询,结果成功了

因此,结果是:它与
PDO::exec()
一起工作,但与
PDO::query
PDO::prepare()一起失败

我想知道这背后的原因,
PDO::exec()
是否做了一些特殊的事情,或者 拉威尔有一些特殊的配置

注1:我已经尝试过上述解决方案&
注2:如果使用简单的PDO而不是Laravel DB包装器,它将非常有效。
注3:PDO正在使用mysqlnd驱动程序