tp5.1 怎么查询某日期范围24小时内每小时的数据

浏览:2096 发布日期:2021/01/01 分类:求助交流
我有一个文章列表news,里面有个发布时间字段create_time,时间戳格式

我想统计比如2020-12-1至2020-12-5时间段内每小时段发布的文章数量

比如输出这样的数组
array(2) {
[0] => array(2) {
["count"] => int(2)
["hours"] => string(2) "00:00"
}
[1] => array(2) {
["count"] => int(0)
["hours"] => string(2) "01:00"
}
[~~]直到23:00的数据
}

最佳答案
评论() 相关
后面还有条评论,点击查看>>