SELECT a.cat_id,a.id,a.photo,a.news,a.short_news,DATE_FORMAT(a.newsposton,"%h:%i %p") as PostTime,a.visitors,b.category
FROM itpoka_everydaynews a, news_categories b
WHERE a.cat_id=b.cat_id and a.isactive=1 and a.cat_id=12 order by a.newsposton desc LIMIT 0, 5