SELECT IF(p.fullurl='' OR p.fullurl IS NULL, CONCAT('/',p.url),p.fullurl) AS pageurl FROM urlhistory AS h INNER JOIN pages AS p ON p.id=h.page_id WHERE p.site_id='11' AND p.deleted=0 AND p.published=1 AND (h.url='/Environmental News/Veolia Environmental Services Achieves Star Status in OSHA's Voluntary Protection Program for Eighth Facility' OR h.url='Environmental News/Veolia Environmental Services Achieves Star Status in OSHA's Voluntary Protection Program for Eighth Facility') ORDER BY h.id DESC LIMIT 1
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 Voluntary Protection Program for Eighth Facility' OR h.url='Environmental News' at line 13