大家好,对按照小时显示更新数量怎么实现感兴趣的小伙伴,下面一起跟随三零脚本的小编来看看按照小时显示更新数量怎么实现的例子吧。
用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")?>