[ecmsinfo]"select * from phome_4ecms_news where checked=1 order by diggtop desc,id desc limit 10",10,30,0,24,10,0[/ecmsinfo]
這個(gè)是頂?shù)呐判?br />
[ecmsinfo]"select * from phome_4ecms_news where newspath >SUBDATE(NOW(),INTERVAL 7 DAY) order by onclick desc limit 10",10,30,0,24,10,0[/ecmsinfo]
這個(gè)是點(diǎn)擊的排行。。
大蝦能告訴我具體怎么改嗎??!
因?yàn)椴话礄谀縼?lái)顯示的話(huà)。。只要一上新聞就會(huì)出現(xiàn)在排行榜!!
select * from phome_4ecms_news where checked=1 and classid in (欄目id1,id2...,idn) order by diggtop desc,id desc limit 10
謝謝樓上大蝦。。
[ecmsinfo]"select * from phome_4ecms_news where newspath >SUBDATE(NOW(),INTERVAL 7 DAY) order by onclick desc limit 10",10,30,0,24,10,0[/ecmsinfo]
這個(gè)按欄目又怎么寫(xiě)呢。。我用頂?shù)姆绞綄?xiě)輸出無(wú)內(nèi)容了?。≈x謝大蝦。。我知道我很煩。。
select * from phome_4ecms_news where newspath >SUBDATE(NOW(),INTERVAL 7 DAY) and classid=欄目id order by onclick desc limit 10
版權(quán)聲明: 本站資源均來(lái)自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!
轉(zhuǎn)載請(qǐng)注明: sql調(diào)用點(diǎn)擊排行和頂排行,怎么指定欄目ID?