织梦查询当前周,当前月发布文章的数量

织梦查询某栏目这一周发布文章的数量

Select count(id) as total From dede_archives  where YEARWEEK(FROM_UNIXTIME(pubdate,'%Y-%m-%d')) = YEARWEEK(now()) and typeid = 171

织梦查询某栏目当前月发布文章的数量

Select count(id) as total From dede_archives where FROM_UNIXTIME(pubdate,'%Y-%m') = date_format(now(),'%Y-%m') and typeid =171

织梦查询某栏目今年发布文章的数量

Select count(id) as total From dede_archives where FROM_UNIXTIME(pubdate,'%Y') = date_format(now(),'%Y') and typeid =171

所有sql语句,我都测试过,分享给大家
支付宝扫码打赏 微信扫码打赏

如果本文对你有帮助,欢迎打赏本站

喜欢 ()or分享
    匿名评论
  • 评论
人参与,条评论