DATABASE QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) GROUP BY asortyment.id_asort ' at line 15, QUERY: SELECT SQL_CALC_FOUND_ROWS producers.name as __producer_name,asortyment.id_asort,asortyment.id_kat,asortyment.id_producent,asortyment.kod_produktu,asortyment.name_asor AS name_asor,asortyment.opis_asort AS opis_asort,asortyment.price AS price,asortyment.vat AS vat,asortyment.promotion AS promotion,asortyment.promotion_price AS promotion_price,asortyment.promotion_price_mod AS promotion_price_mod,asortyment.promotion_from AS promotion_from,asortyment.promotion_to AS promotion_to,asortyment.promotion_text AS promotion_text,asortyment.has_variants,asortyment.status,asortyment.kolejnosc,asortyment.is_used,asortyment.is_deleted,kategorie.slug AS __category_slug,asortyment.delivery_id,asortyment.avalaibility,SUM( IF (asortyment.has_variants = 0, asortyment.quantity, variants.quantity ) ) AS __quantity FROM asortyment LEFT JOIN variants ON variants.product_id = asortyment.id_asort AND variants.is_deleted = 0 AND variants.is_active = 1 LEFT JOIN kategorie ON kategorie.category_id = asortyment.category_id LEFT JOIN producers ON producers.id = asortyment.id_producent WHERE asortyment.is_deleted = 0 AND asortyment.status = 1 AND (asortyment.status = 1 AND asortyment.is_deleted = 0 AND asortyment.enabled = 1) AND ((asortyment.id_kat LIKE '%-001001%') OR (asortyment.category_id = '001001')) AND ( (asortyment.has_variants = 0 AND asortyment.quantity > 0) OR (asortyment.has_variants = 1 AND variants.quantity > 0) ) AND (asortyment.id_asort IN ()) GROUP BY asortyment.id_asort ORDER BY kolejnosc asc LIMIT 0, 16DATABASE QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) GROUP BY asortyment.id_asort ' at line 15, QUERY: SELECT SQL_CALC_FOUND_ROWS producers.name as __producer_name,asortyment.id_asort,asortyment.id_kat,asortyment.id_producent,asortyment.kod_produktu,asortyment.name_asor AS name_asor,asortyment.opis_asort AS opis_asort,asortyment.price AS price,asortyment.vat AS vat,asortyment.promotion AS promotion,asortyment.promotion_price AS promotion_price,asortyment.promotion_price_mod AS promotion_price_mod,asortyment.promotion_from AS promotion_from,asortyment.promotion_to AS promotion_to,asortyment.promotion_text AS promotion_text,asortyment.has_variants,asortyment.status,asortyment.kolejnosc,asortyment.is_used,asortyment.is_deleted,kategorie.slug AS __category_slug,asortyment.delivery_id,asortyment.avalaibility,SUM( IF (asortyment.has_variants = 0, asortyment.quantity, variants.quantity ) ) AS __quantity FROM asortyment LEFT JOIN variants ON variants.product_id = asortyment.id_asort AND variants.is_deleted = 0 AND variants.is_active = 1 LEFT JOIN kategorie ON kategorie.category_id = asortyment.category_id LEFT JOIN producers ON producers.id = asortyment.id_producent WHERE asortyment.is_deleted = 0 AND asortyment.status = 1 AND (asortyment.status = 1 AND asortyment.is_deleted = 0 AND asortyment.enabled = 1) AND ((asortyment.id_kat LIKE '%-001001%') OR (asortyment.category_id = '001001')) AND ( (asortyment.has_variants = 0 AND asortyment.quantity > 0) OR (asortyment.has_variants = 1 AND variants.quantity > 0) ) AND (asortyment.id_asort IN ()) GROUP BY asortyment.id_asort ORDER BY kolejnosc asc LIMIT 0, 16