我是靠谱客的博主 调皮蛋挞,这篇文章主要介绍mysql sqlcode 2014_SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffere...,现在分享给大家,希望可以做个参考。
服务器操作系统: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内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复