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, cat_id as cat_id, btw_vrij as btw_vrij from lessen where id = and status_nl = 2 order by naam_nl