MySQL-Fehler: SELECT-Liste ist nicht in GROUP BY-Klausel
Ich habe ein Problem mit meiner Abfrage und MySQL löst den folgenden Fehler aus:
#1055 - Expression #66 of SELECT list is not in GROUP BY clause and
contains nonaggregated column 's.status' which is not functionally
dependent on columns in GROUP BY clause; this is incompatible with
sql_mode=only_full_group_by
Query ist:
select p.*,
pd.*,
m.*,
IF(s.status, s.specials_new_products_price, null) as specials_new_products_price,
IF(s.status, s.specials_new_products_price, p.products_price) as final_price
FROM products p
LEFT JOIN specials s ON p.products_id = s.products_id
LEFT JOIN manufacturers m using(manufacturers_id) ,
products_description pd,
categories c,
products_to_categories p2c
WHERE p.products_view = 1
AND p.products_status = 1
AND p.products_archive = 0
AND c.virtual_categories = 0
AND p.products_id = pd.products_id
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id
AND pd.language_id = 1
GROUP BY p.products_id;