SQL error 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 '' at line 9

SELECT al_felh_ID AS id, al_ID, al_cim, al_jellemzok, al_kep, al_datum, al_meretszam, al_meretszam2, al_meretszam3, al_me_ID, al_festoanyag_ID, al_szamlalo, al_tkeszito, (SELECT COUNT(kom_ID) FROM alk_komment AS k WHERE kom_alk_ID=al_ID AND k.aktiv='1') AS velemeny FROM alk_alkotas INNER JOIN alk_felhasznalo ON al_felh_id=fh_id WHERE al_aktiv=1 AND fh_aktiv=1 ORDER BY al_id DESC LIMIT