加入收藏 | 设为首页 | 会员中心 | 我要投稿 济源站长网 (https://www.0391zz.cn/)- 数据工具、数据仓库、行业智能、CDN、运营!
当前位置: 首页 > 教程 > 正文

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

发布时间:2021-02-27 06:02: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")?>

(编辑:济源站长网)

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

    热点阅读