首页 > CMS > Discuz > 正文

discuz x3.2查询数据表并单独使用字段调用数据代码

2024-09-11 09:05:27
字体:
来源:转载
供稿:网友
$daythreads = DB::query("SELECT todayposts,yesterdayposts,threads,posts FROM ".DB::table('forum_forum')." WHERE type='forum'");while($dayt = DB::fetch($daythreads)) {$todayposts += $dayt['todayposts'];$yesterdayposts += $dayt['yesterdayposts'];$threads += $dayt['threads'];$posts += $dayt['posts'];}

复制代码
{$todayposts}今日发帖数{$yesterdayposts}昨日发帖数{$threads}主题数{$posts}帖子数
 
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表