SELECT SQL_CALC_FOUND_ROWS p.id, pt.name, p.slug, pp.price, pp.promo, pp.price_promo, pp.availability, pp.id as param_id, pp.name_hu as param_name,
IF(pp.promo = 'yes', pp.price_promo, pp.price) as actual_price,
p.ref_num, p.created_at, pt.meta_description, p.new, p.publisher_id,
pub.name as publisher, p.top, p.action, p.soon, p.gift,
p.most_sold, m.name as measure, pt.description
FROM products p
INNER JOIN products_text pt ON p.id = pt.product_id AND pt.language_id = 5
INNER JOIN product_categories pc ON p.id = pc.product_id
INNER JOIN products_params pp ON p.id = pp.product_id
LEFT JOIN pages_text pub ON p.publisher_id = pub.page_id AND pub.language_id = 5
LEFT JOIN pages_text m ON p.measure_id = m.page_id AND m.language_id = 5
WHERE p.status != 'deleted'
AND
GROUP BY p.id
ORDER BY p.id DESC
LIMIT 5 OFFSET 0
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 p.id
ORDER BY p.id DESC
LIMIT 5 OFFSET 0' at line 53
file -
line -