Error Number: 1064

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 '' at line 2

SELECT id_products, is_top, is_new, is_shared, status, price_osn2 as price_osn FROM (SELECT products.id_products as products_id FROM products2params_val JOIN products ON product_id = id_products WHERE 1 = 1 AND products.products_category_id = '0100558' AND products2params_val.param_value_id IN ('0000609')) as p_00393, products WHERE p_00393.products_id = products.id_products AND