code: 'ER_WRONG_FIELD_WITH_GROUP',
errno: 1055,
sqlMessage: "Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'fashioncart.items.item_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by",
Why do this error comes for? How can I resolve it?
This is related to the annoying 'ONLY_FULL_GROUP_BY' default setting in mysql. My advice, permanently switch it off.
mysql> SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''))
Refer this for more details: Disable ONLY_FULL_GROUP_BY
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With