1064 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 '376) or categories_id in (select categories_id from categories where parent_id='' at line 1
in:
[select count(*) as total FROM products p LEFT JOIN manufacturers m ON (p.manufacturers_id = m.manufacturers_id), products_description pd WHERE p.products_status = 1 AND p.products_id = pd.products_id AND p.products_id not in (select products_id from products_exchange) AND pd.language_id = 3 AND p.products_id in (select products_id from products_to_categories where categories_id in (,376) or categories_id in (select categories_id from categories where parent_id='376' and categories_status='1') or categories_id in (select categories_id from categories where parent_id in (select categories_id from categories where parent_id='376' and categories_status='1'))) ]