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 price DESC' at line 4SELECT p.indexID AS propertyID, p.name AS pName, g.name AS gName, address, areaTypeID, postcode, town, area, price, tenureType, measure, friendlyUrlString, a.name AS areaName FROM properties p LEFT JOIN geoLocations g ON g.indexID = geoLocationID LEFT JOIN areaTypes a ON p.areaTypeID=a.indexID WHERE p.status = 'Live' AND geoLocationID IN (5) AND p.indexID IN (SELECT propertyID FROM property_groupings WHERE groupingID IN ( )) ORDER BY price DESC