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 'ORDER BY BNprops.price DESC LIMIT 0,8' at line 8SELECT BNprops.id, BNprops.town, opt_proptypes.ptype_desc, BNprops.price, countries.country, BNprops.country_id, BNprops.price_options, BNprops.details, BNprops.image, BNprops.category, categories.CategoryName, opt_priceoptions.price_optdesc, regions.name AS regionname FROM BNprops, countries, opt_proptypes, categories, opt_priceoptions, regions WHERE BNprops.county_id = regions.id AND categories.CategoryID = BNprops.category AND price_optid = price_options AND opt_proptypes.ptype_id = BNprops.property_type_id AND BNprops.country_id = 16 AND countries.id = BNprops.country_id AND county_id = ORDER BY BNprops.price DESC