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 's-health-insurance-program-(schip).html%' order by id limit 1' at line 1: select user_id from instution_ipaddress where is_verified = 1 and referer_check LIKE 'http://randstatestats.org/tx/stats/state-children's-health-insurance-program-(schip).html%' order by id limit 1