SELECT pp.id, pp.name, pp.ref, pp.image, pp.availability, -- ps.id as size_av, pp.promo, pp.price, pp.price_promo FROM products_params pp -- LEFT JOIN products_params_sizes ps ON pp.id = ps.param_id AND ps.quantity > 0 WHERE pp.product_id = GROUP BY pp.id
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GROUP BY pp.id' at line 7