首页| 版块| 我的| 发帖| 消息
主题:2016年1月15日:修正电脑版论坛统计数据主题数和帖子数误差(部分与拆分操作有关)
zhangjingyu 
index.htm
帖子$article

index.php(关键字article,第2行查询fd.article、 pw_forumdata和第16行)
if (!Perf::checkMemcache() || !$_tmpForums){
    $query = $db->query("SELECT f.fid,f.name,f.type,f.childid,f.fup,f.logo,f.descrip,f.metadescrip,f.forumadmin,f.across,f.allowhtm,f.password,f.allowvisit,f.showsub,f.ifcms,fd.tpost,fd.topic,fd.article,fd.subtopic,fd.top1,fd.lastpost FROM pw_forums f LEFT JOIN pw_forumdata fd USING(fid) WHERE f.ifsub='0' AND f.ifcms!=2 $sqlwhere ORDER BY f.vieworder");
    $_tmpForums = array();
    while ($forums = $db->fetch_array($query)) {
        $_tmpForums[$forums['fid']] = $forums;
    }
    !$cateid && Perf::checkMemcache() &&  $_cacheService->set('all_forums_info', $_tmpForums, 300);
}

foreach ($_tmpForums as $forums) {
    if ($forums['type'] === 'forum') {
        if ($forums['showsub'] && $forums['childid']) {
            $showsub[$forums['fid']] = '';
        }
        $forums['topics'] = $forums['topic'] + $forums['subtopic'];
        $article += $forums['article'];
        $topics += $forums['topics'];
        $tposts += $forums['tpost'];
$article += $o_post;
zhangjingyu回帖于2018-09-12 22:23[查看电脑版]
下一楼»:现在,站点信息里主题数对,帖子总数和数据表对不起来,多2个,不知道问题在哪里?很晚了,有时 ..
«上一楼:小涵涵的童年生活之神墨特色幼儿园篇

查看全部回帖(203)
«返回主帖