Rayle0801

113 经验值

我也使用了下,就是不显示啊,{\Carbon\Carbon::parse($val->created_at)->diffForHumans()}就显示呢,怪的很

服务器的mysql 5.6.34,这错误是连接服务器数据库报的错,本地的mysql是5.7.17也报错
of SELECT list is not in GROUP BY clause and contains nonaggregated column 'ezhenduan2.app_game_answer_record.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (SQL: select id, quality, uid from app_game_answer_record group by uid)

使用的ubuntu,本地配置的apache环境,laravel 5.3使用groupBy报错

    `$list   = \DB::table('game_answer_record')->groupBy('uid')->select(\DB::raw('id, quality, uid'))->get();`

报的错误如下 :
`QueryException in Connection.php line 770:
SQLSTATE[42000]: Syntax error or access violation: 1055 'ezhenduan2.app_game_answer_record.id' isn't in GROUP BY (SQL: select id, quality, uid from app_game_answer_record group by uid)`
sql语句在mysql中执行正常