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, Denmark' AND pages.publish = 'yes' AND categories.category_id = category_' at line 4 Getting a list of pages to display