SQL:
select a.id,a.classid,a.title,a.titlepic,a.username,a.userid,a.applynum,a.onclick,a.titleurl,b.id,b.classid,count(b.id) fromphome_ecms_news as a left join phone_enewsfava as b on a.id=b.id and a.classid=b.classid where a.classid=1 anda.ispic=1 group by a.id order by count(b.id) DESC limit 5
其中的信息表、欄目id等條件可以根據(jù)自己的需求來調(diào)整!
版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會員發(fā)布,如果侵犯了您的權(quán)益請與我們聯(lián)系,我們將在24小時內(nèi)刪除!謝謝!
轉(zhuǎn)載請注明: 帝國cms調(diào)用信息按收藏數(shù)排序SQL