select distinct c.id as newsid,a.page_id as pageid,a.category_id as subcat,b.name,c.header,c.image,concat(substring(c.content,1,200),'...') as cont from relation a,page b,news c where a.page_id=b.catid and c.id=a.news_id and c.tur=1 and a.site_id='1' and arsiv=0 and onay=1 and a.anasayfa=1 and b.id!=40 order by b.ordered asc,tarih desc limit 1