1064 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 'AND status_header = 1 and header_sort_order > 0 order by header_sort_order, pag' at line 1 in: [select * from ezpages where languages_id = AND status_header = 1 and header_sort_order > 0 order by header_sort_order, pages_title]