原因是mysql版本是5.7及以上, mysql默认配置是:sql_mode="ONLY_FULL_GROUP_BY"
加上这个代码使其兼容就可以
try {Db::execute("SET @@sql_mode='';"); } catch (\Exception $e) { }
$res = db()->query('......');
原因是mysql版本是5.7及以上, mysql默认配置是:sql_mode="ONLY_FULL_GROUP_BY"
加上这个代码使其兼容就可以
try {Db::execute("SET @@sql_mode='';"); } catch (\Exception $e) { }
$res = db()->query('......');