SQLSTATE[42000]: Syntax error or access violation: 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 ')) order by category_id asc, name_ua asc LIMIT' at line 9
select product_id, CASE WHEN quantity != 0 THEN 1 WHEN EXISTS (SELECT 1 FROM product_attribute attribute WHERE attribute.product_id = product.product_id) THEN 1 ELSE 0 END AS quantity from product where quantity > 0 and status = 1 and (product_id in ()) order by category_id asc, name_ua asc LIMIT 0, 100