帝国CMS自定义列表如何按时间调用
时间:2025-11-22 16:44:38|栏目:帝国CMS|点击: 次
演示代码按8小时、24小时、7天、30天、365天时间调用,大家可以参照代码按实际情况修改3600*72=72小时:
8小时内 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小时内 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天内 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
您可能感兴趣的文章


阅读排行
推荐教程
- 09-22帝国cms怎么查看某个目录权限
- 09-22帝国cms怎么建站
- 09-22帝国cms源码怎么查看
- 09-22帝国cms怎么设置邀请码
- 11-22帝国CMS二次开发调用评论我的列表
- 11-22帝国cms中新建栏目提示“建立目录不成功,请检查目录权限”
- 11-22帝国CMS自定义列表查询SQL语句,从第N条开始查询的方法
- 11-22帝国CMS在js登陆模板中调用当前登陆用户的头像!
- 11-22帝国CMS二次开发如何设置随机会员头像
- 11-22帝国cms在当前栏目页下面调用相关栏目别名的栏目





