首页 > CMS > Discuz > 正文

discuz x3.2 用户24小时内发帖量统计代码

2024-09-11 09:05:28
字体:
来源:转载
供稿:网友
24小时内发布的正常状态的帖子量
//24小时内主题数量
$day_beforet = $_G[timestamp]-86400;
$oneday_threads = DB::result_first("select count(tid) from ".DB::table("forum_post")." where `first`=1 and `invisible`=0 and `dateline`>'$day_beforet' and `dateline`<'$_G[timestamp]'");
复制代码
$_G[timestamp],当前时间戳。
$_G[timestamp]-86400,24小时前的时间戳。
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表