加入收藏 | 设为首页 | 会员中心 | 我要投稿 鞍山站长网 (https://www.0412zz.com/)- 应用安全、运维、云计算、5G、云通信!
当前位置: 首页 > 教程 > 正文

按照小时显示更新数量怎么实现

发布时间:2021-02-24 15:24:15 所属栏目:教程 来源:网络整理
导读:用sql调用 12小时:?=$empire-gettotal("select count(*) as total from phome_ecms_表 where newstimeUNIX_TIMESTAMP()-24*3600")? 6小时:?=$empire-gettotal("select count(*) as total from phome_ecms_表 where newstimeUNIX_TIMESTAMP()-6*3600")?

用sql调用
12小时:<?=$empire->gettotal("select count(*) as total from phome_ecms_表 where newstime>UNIX_TIMESTAMP()-24*3600")?>
6小时:<?=$empire->gettotal("select count(*) as total from phome_ecms_表 where newstime>UNIX_TIMESTAMP()-6*3600")?>

(编辑:鞍山站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读