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 '-10, 1' at line 31 SELECT * FROM property WHERE property.active = 1 AND on_market = 1 AND department = 'lettings' AND price > 0 AND ( submitted_at IS NULL OR submitted_at = '0000-00-00 00:00:00' OR ( submitted_at IS NOT NULL AND approved_at IS NOT NULL ) ) /* AND EXISTS( SELECT * FROM property_media WHERE property_media.property_id = property.property_id AND property_media.active = 1 AND media_type = 'image' LIMIT 1 )*/ AND ( display_address LIKE '%heather glen%' OR street LIKE '%heather glen%' OR address_2 LIKE '%heather glen%' OR address_3 LIKE '%heather glen%' OR address_4 LIKE '%heather glen%' OR postcode_1 = 'heather glen' ) ORDER BY created_at DESC, property.property_id LIMIT -10, 1