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
PrdOptVal0.option_type=0 AND PrdOptVal0.option_value_uk <=
)) GROU' at line 7
SELECT PrdOptVal0.productID FROM SC_product_options_values PrdOptVal0
WHERE PrdOptVal0.optionID=29 AND (
PrdOptVal0.optionID=29
AND
(
PrdOptVal0.option_type=0 AND PrdOptVal0.option_value_uk >=
AND
PrdOptVal0.option_type=0 AND PrdOptVal0.option_value_uk <=
)) GROUP BY PrdOptVal0.productID