1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'llanosgr_shop1.o.date_purchased' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

SELECT p.products_id, p.products_image FROM orders_products opa, orders_products opb, orders o, products p WHERE opa.products_id = '523' AND opa.orders_id = opb.orders_id AND opb.products_id != '523' AND opb.products_id = p.products_id AND p.products_stores_id=15 AND opb.orders_id = o.orders_id AND p.products_status = '1' GROUP BY p.products_id ORDER BY o.date_purchased DESC LIMIT 6

[TEP STOP]