mysql 报错
SQLSTATE[42000]: Syntax error or access violation: 1140 In aggregated query without GROUP BY, expression #6 of SELECT list contains nonaggregated column ‘live.fa_shop_tdayorder.total_payamount’; this is incompatible with sql_mode=only_full_group_by
临时解决办法,每次重启MySQL 都需要运行。以下命令
SET @@global.sql_mode='STRICT_TRANS_TABLES';
永久解决办法, 在 [mysqld] 下加入以下配置重启MySQL
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUT
O_CREATE_USER,NO_ENGINE_SUBSTITUTION