phpstudy v8 运行可能导致MySQL报错问题
最近下载了phpstudy v8(新版phpstudy)方便好用很多,但也有一些坑
我搭建一个网站配置好一个虚拟域名之后,运行。
可以打开网站,登录也正常
登录进去之后,发现有些功能正常有些功能不能用,查看报错信息
SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘sqtg.Ordergoods.id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
解决方法:在phpstudy的mysql.ini文件中添加
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"