You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 's-wood-%' AND ai_status = 'page' LIMIT 1' at line 1

SELECT title2 FROM new_cms WHERE title2 LIKE 'house-clearance-st-john's-wood-%' AND ai_status = 'page' LIMIT 1