本文介绍如何用标签代码统计按小时更新的内容数量,对一定时间内容的更新信息进行统计,方法很简单下面介绍两个例子:
12小时发文数量统计: <?=$empire->gettotal("select count(*) as total from zhan_eCMS_news where newstime>UNIX_TIMESTAMP()-24*3600")?>
6小时发文数量统计: <?=$empire->gettotal("select count(*) as total from zhan_ecms_news where newstime>UNIX_TIMESTAMP()-6*3600")?>
一周统计:<?=$empire->gettotal("select count(*) as total from zhan_ecms_news where newstime>UNIX_TIMESTAMP()-168*3600")?>
上面写的是统计新闻表的,如果要统计其它且只需要改下表名即可。
感谢您的来访,获取更多精彩文章请收藏本站。
© 版权声明
THE END

















暂无评论内容