Er zit een foutje in de select query :
select * from agenda,groepen,zaal,feest where afeestid=fid and agroepid=gid and azaalid=zid and taal= and adatum >='2012-05-20' order by adatum
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 adatum >='2012-05-20' order by adatum' at line 1