加入收藏 | 设为首页 | 会员中心 | 我要投稿 甘孜站长网 (https://www.0836zz.com.cn/)- 运维、物联设备、数据计算、智能推荐、云管理!
当前位置: 首页 > 教程 > 正文

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

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

(编辑:甘孜站长网)

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

    热点阅读