WordPress database 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 ')
AND term_id IN ( )
AND is_variation_attribute = 1
GROUP BY product_id' at line 7]SELECT
product_or_parent_id,
IF( temp1.product_id IS NOT NULL, temp1.product_id, temp2.product_id ) AS product_id
FROM (
SELECT product_or_parent_id, product_id, count( DISTINCT( taxonomy ) ) AS cnt
FROM wpl2_wc_product_attributes_lookup
WHERE taxonomy IN ( )
AND term_id IN ( )
AND is_variation_attribute = 1
GROUP BY product_id
) AS temp1
LEFT JOIN (
SELECT product_or_parent_id, product_id, count( DISTINCT( taxonomy ) ) AS cnt
FROM wpl2_wc_product_attributes_lookup
WHERE taxonomy IN ( )
AND term_id IN ( )
AND is_variation_attribute = 0
GROUP BY product_or_parent_id
) AS temp2 USING ( product_or_parent_id )
WHERE IF( temp1.cnt IS NULL, 0, temp1.cnt ) + IF( temp2.cnt IS NULL, 0, temp2.cnt ) = 0
UNION
SELECT
product_or_parent_id,
IF( temp1.product_id IS NOT NULL, temp1.product_id, temp2.product_id ) AS product_id
FROM (
SELECT product_or_parent_id, product_id, count( DISTINCT( taxonomy ) ) AS cnt
FROM wpl2_wc_product_attributes_lookup
WHERE taxonomy IN ( )
AND term_id IN ( )
AND is_variation_attribute = 0
GROUP BY product_or_parent_id
) AS temp1
LEFT JOIN (
SELECT product_or_parent_id, product_id, count( DISTINCT( taxonomy ) ) AS cnt
FROM wpl2_wc_product_attributes_lookup
WHERE taxonomy IN ( )
AND term_id IN ( )
AND is_variation_attribute = 1
GROUP BY product_id
) AS temp2 USING ( product_or_parent_id )
WHERE IF( temp1.cnt IS NULL, 0, temp1.cnt ) + IF( temp2.cnt IS NULL, 0, temp2.cnt ) = 0