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_nl = 2 order by naam_nl' at line 1select naam_nl as naam, id as id, foto as foto, txt_nl as txt, prijs as prijs, page_id_nl as page_id, foto_sub_nl as foto_sub, foto_sub_nl_mob as foto_sub_mob, cat_id as cat_id, pdf_1_nl as pdf_1, pdf_2_nl as pdf_2, pdf_3_nl as pdf_3, btw_vrij as btw_vrij from lessen where id = and status_nl = 2 order by naam_nl