Query failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND p.BLN_ACTIEF=1 GROUP BY p.id ORDER BY p.DAT_YEAR DESC' at line 1 SELECT p.id, p.DAT_YEAR as year, p.STR_USERNAME as username, p.IMG_PASSPHOTO as passphoto, p.STR_TITLE as title, IF (t.STR_TITLE<>'',t.STR_TITLE,p.STR_TITLE) as title, GROUP_CONCAT(DISTINCT CONCAT_WS(' ',n.STR_FIRSTNAME,n.STR_PREFIX,n.STR_SURNAME) SEPARATOR ', ') as participants FROM project as p LEFT JOIN university as u ON (u.id=p.FKY_UNIVERSITY) LEFT JOIN project_translation as t ON (p.id=t.FKY_PROJECT AND t.PKL_LANGUAGE='nl') LEFT JOIN participant as n ON (n.FKY_PROJECT = p.id) WHERE p.FKY_UNIVERSITY= AND p.BLN_ACTIEF=1 GROUP BY p.id ORDER BY p.DAT_YEAR DESC