Aggregated query without GROUP BY

前端 未结 4 2073
慢半拍i
慢半拍i 2020-12-10 11:28

This query seems to work perfect on my older machine. However, on my new machine with MySQL 5.7.14 and PHP 5.6.25 it seems to throw an error:

Fatal er

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-10 11:58

    Change ur SQL mode to default.. it will execute without error The SQL mode defines the syntax of the query. If you using ONLY_FULLY_GROUPBY you have to write a query with group by for all aggregator functions

提交回复
热议问题