详情页

帝国cms按照小时显示更新数量统计代码

时间:2023年08月14日

编辑:佚名

本文介绍如何用标签代码统计按小时更新的内容数量,对一定时间内容的更新信息进行统计,方法很简单下面介绍两个例子:
12小时发文数量统计: <?=$empire->gettotal("select count(*) as total from phome_ecms_news where newstime>UNIX_TIMESTAMP()-24*3600")?>
6小时发文数量统计: <?=$empire->gettotal("select count(*) as total from phome_ecms_news where newstime>UNIX_TIMESTAMP()-6*3600")?>
上面写的是统计新闻表的,如果要统计其它且只需要改下表名即可。
以上就是帝国cms按照小时显示更新数量统计代码方法。
相关文章
猜你需要