概述
服务器操作系统:LINUX
服务器环境:nginx1.4.7
php版本:php5.6.9
mysql版本:mysql5.5.34-log
开源框架:tpshop
报错详情:
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.
搜索到的解决办法:
application/database.php中第28行
//数据库连接参数
'params' => [],
修改如下
//数据库连接参数
'params' => array('1002' => "SET NAMES utf8", #initial query
'1000' => true, #PDO::MYSQL_ATTR_USE_BUFFERED_QUERY
),
修改后就不在报这个错误了
最后
以上就是调皮蛋挞为你收集整理的mysql sqlcode 2014_SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffere...的全部内容,希望文章能够帮你解决mysql sqlcode 2014_SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffere...所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复