You have an error in your SQL syntax near 'AND '/conde-sd-timewarner.html' LIKE CONCAT(dynamic_pages.beginurl,'%') AND '/co' at line 1