<!--{eval $fids = '2,36,37,39';$recs=array();$query=DB::query("SELECT * FROM ".DB::table('forum_forumrecommend')." where fid in ($fids) order by `tid` desc limit 10");while($item=DB::fetch($query))$recs[]=$item;}--> <!--{loop $recs $rec}--> <li><a href="forum.php?mod=viewthread&tid=$rec['tid']">$rec['subject']</a><span class="pipe">|</span>作者<!--{$rec['author']}--></li> <!--{/loop}--> |
那么代碼: <!--{eval $fids = '2,36,37,39';$recs=array();$query=DB::query("SELECT fid,max(tid) as tid,subject,tid,author FROM ".DB::table('forum_forumrecommend')." where fid in ($fids) group by `fid` order by `tid` desc limit 10");while($item=DB::fetch($query))$recs[]=$item;}--> <!--{loop $recs $rec}--> <li><a href="forum.php?mod=viewthread&tid=$rec['tid']">$rec['subject']</a><span class="pipe">|</span>作者<!--{$rec['author']}--></li> <!--{/loop}--> |
版權(quán)聲明: 本站資源均來(lái)自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!
轉(zhuǎn)載請(qǐng)注明: discuz x3.2調(diào)用版主推薦主題