$sql = "SELECT a.*,b.*,c.* FROM ".DB::table('forum_thread')." a inner join ".DB::table('forum_forum')." b on a.fid=b.fid inner join ".DB::table('forum_post')." c on a.tid=c.tid and c.first=1 where a.displayorder>=0 AND a.fid<>189 AND a.fid<>190 ORDER BY a.tid DESC LIMIT 0,50";