จาก Error
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'tablename.a.anonymous_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by [1055]
ถ้าต้องการแก้ไข ที่ config ของ MySQL สามารถทำได้ดังนี้
เข้า phpMyAdmin ในฐานะ user root
รันคำสั่ง SQL
Code: Select all
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''))
(ไม่ต้อง Restart MySQL)
อีกวิธี คือ แก้ไข my.cnf
Code: Select all
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
save และ restart MySQL