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 'Best_Companies'_accreditation'' at line 1 select * from categories where url='news/51/109/CEL_Group_achieves_'Best_Companies'_accreditation';