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 s.sene=2017 GROUP BY vgi.il_id,vg.id ' at line 15
SELECT SQL_CALC_FOUND_ROWS vg.id,vgv.aciklama,vg.galeri_ad,vgv.video_embed FROM video_galeri vg,video_galeri_iller vgi,video_galeri_videolar vgv, haberler h, haber_iller hi,ligler l,sezon s WHERE vgv.galeri_id=vg.id and (vgi.il_id='34' or '34'=0 or vgi.il_id=0) and vg.uygulama_id=18 AND h.video_galeri_id=vg.id AND vgi.video_galeri_id=vg.id AND hi.haber_id=h.id AND hi.il_id =34 AND h.durum=1 AND h.tip_id=4 AND l.id=hi.lig_id AND s.lig_id=l.id AND l.id= AND s.sene=2017 GROUP BY vgi.il_id,vg.id order by vg.id desc ,vgv.id limit 12