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 lower(location) = 'wyoming'
AND (
forsale_euro.status =2 OR forsale_euro' at line 6
SELECT *
FROM forsale_euro
LEFT JOIN opt_proptype ON forsale_euro.prop_type = opt_proptype.proptype_id
LEFT JOIN opt_locationtype ON forsale_euro.locationtype = opt_locationtype.loctype_id
WHERE eu_country =
AND lower(location) = 'wyoming'
AND (
forsale_euro.status =2 OR forsale_euro.status =4 OR forsale_euro.status =7
)
AND (forsale_euro.SaleRent = 'A')
AND EURprice >= 0
ORDER BY price DESC