A Database Error Occurred

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 'AND types.types_id=products.products_type AND products.products_status=1 ' at line 4

SELECT DISTINCT types.types_id, types.types_name, types.types_icon FROM types,products WHERE products.products_range= AND types.types_id=products.products_type AND products.products_status=1 ORDER BY types.sort_order ASC