加入收藏 | 设为首页 | 会员中心 | 我要投稿 核心网 (https://www.hxwgxz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 教程 > 正文

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

发布时间:2021-02-25 16:49:09 所属栏目:教程 来源:网络整理
导读:用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")?>

(编辑:核心网)

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

    热点阅读