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

  1. 12小时发文数量统计

    • 使用以下代码:
      <?= $empire->gettotal("select count(*) as total from cn_ecms_news where newstime > UNIX_TIMESTAMP() - 24 * 3600") ?>
  2. 6小时发文数量统计

    • 使用以下代码:
      <?= $empire->gettotal("select count(*) as total from cn_ecms_news where newstime > UNIX_TIMESTAMP() - 6 * 3600") ?>

 

posted @ 2024-11-08 09:03  黄文Rex  阅读(24)  评论(0)    收藏  举报