演示代碼按8小時、24小時、7天、30天、365天時間調(diào)用,大家可以參照代碼按實(shí)際情況修改3600*72=72小時
8小時內(nèi) select count(*) as total from [!db.pre!]ecms_news where unix_timestamp(now())-newstime<3600*720 select * from [!db.pre!]ecms_news where unix_timestamp(now())-newstime<3600*720 order by onclick desc 24小時內(nèi) select count(*) as total from [!db.pre!]ecms_news where unix_timestamp(now())-newstime<3600*2400 select * from [!db.pre!]ecms_news where unix_timestamp(now())-newstime<3600*2400 order by onclick desc 7天內(nèi) select count(*) as total from [!db.pre!]ecms_news where unix_timestamp(now())-newstime<3600*7*24 select * from [!db.pre!]ecms_news where unix_timestamp(now())-newstime<3600*7*24 order by onclick desc 一個月 select count(*) as total from [!db.pre!]ecms_news where unix_timestamp(now())-newstime<3600*30*24 select * from [!db.pre!]ecms_news where unix_timestamp(now())-newstime<3600*30*24 order by onclick desc 一年 select count(*) as total from [!db.pre!]ecms_news where unix_timestamp(now())-newstime<3600*365*24 select * from [!db.pre!]ecms_news where unix_timestamp(now())-newstime<3600*365*24 order by onclick desc
版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會員發(fā)布,如果侵犯了您的權(quán)益請與我們聯(lián)系,我們將在24小時內(nèi)刪除!謝謝!
轉(zhuǎn)載請注明: 帝國CMS自定義列表按時間調(diào)用