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_Disgusting_Drinking_Game' AND a.level='0' LIMIT 1' at line 1 : SELECT a.catID,a.catParentID,a.catName,a.baseURL,a.keyword,a.description FROM prod_category a WHERE a.baseURL='p-DS1281_That's_Disgusting_Drinking_Game' AND a.level='0' LIMIT 1 (404.php)