Klaida: klaida jūsų SQL užklausos sintakėje
select distinct DATE_FORMAT(data,'%Y') as data from mod_news where DATE_FORMAT(data,'%Y')<>'2006' and id in (select galery_id from gallery_fotos) and alias_en!='' order by data desc