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 ''plasterers', 20' at line 17

select DISTINCT(master.refid), master.* from master INNER JOIN detailscities ON master.refid = detailscities.refid INNER JOIN cities ON detailscities.city_id = cities.city_id INNER JOIN detailstrade ON master.refid = detailstrade.refid INNER JOIN services ON detailstrade.service_id = services.service_id WHERE city_url = 'newcastle' AND active = 1 AND ( LOWER(master.description) LIKE '%Newcastle%' OR LOWER(master.keywords) LIKE '%Newcastle%' OR LOWER(master.primarywork) LIKE '%Newcastle%' OR LOWER(master.company) LIKE '%Newcastle%' OR LOWER(master.refid) LIKE '%Newcastle%' ) ORDER BY RAND() LIMIT 'plasterers', 20