帝国CMS自定义列表按时刻调用
演示代码按8小时、24小时、7天、30天、365天时刻调用,我们能够参照代码按实际情况修正3600*72=72小时
8小时内 selectcount(*)astotalfrom[!db.pre!]ecms_newswhereunix_timestamp(now())-newstime<3600*720 select*from[!db.pre!]ecms_newswhereunix_timestamp(now())-newstime<3600*720orderbyonclickdesc 24小时内 selectcount(*)astotalfrom[!db.pre!]ecms_newswhereunix_timestamp(now())-newstime<3600*2400 select*from[!db.pre!]ecms_newswhereunix_timestamp(now())-newstime<3600*2400orderbyonclickdesc 7天内 selectcount(*)astotalfrom[!db.pre!]ecms_newswhereunix_timestamp(now())-newstime<3600*7*24 select*from[!db.pre!]ecms_newswhereunix_timestamp(now())-newstime<3600*7*24orderbyonclickdesc 一个月 selectcount(*)astotalfrom[!db.pre!]ecms_newswhereunix_timestamp(now())-newstime<3600*30*24 select*from[!db.pre!]ecms_newswhereunix_timestamp(now())-newstime<3600*30*24orderbyonclickdesc 一年 selectcount(*)astotalfrom[!db.pre!]ecms_newswhereunix_timestamp(now())-newstime<3600*365*24 select*from[!db.pre!]ecms_newswhereunix_timestamp(now())-newstime<3600*365*24orderbyonclickdesc
声明:有的资源均来自网络转载,版权归原作者所有,如有侵犯到您的权益 请联系邮箱:123456@qq.com 我们将配合处理!
原文地址:帝国CMS自定义列表按时间调用发布于2022-06-21 07:43:42