$_G['forum_threadcount'] = DB::result_first("SELECT COUNT(*) FROM ".DB::table($threadtable)." WHERE fid='{$_G['fid']}' $filteradd AND displayorder>='0'");
}
复制代码
改成
$_G['forum_threadcount'] = DB::result_first("SELECT COUNT(*) FROM {$tablepre}pre_forum_thread t WHERE t.fid in(select fid from {$tablepre}pre_forum_forum where fup='{$_G['fid']}' or fid='{$_G['fid']}') $filteradd AND displayorder>='0'");
复制代码
第二步
找到
WHERE t.fid='{$_G['fid']}' $filteradd AND $displayorderadd
复制代码
改成
WHERE t.fid in(select fid from {$tablepre}pre_forum_forum where fup='{$_G['fid']}' or fid='{$_G['fid']}') $filteradd AND $displayorderadd
复制代码
第三步
找到
WHERE t.fid='{$_G['fid']}' $filteradd AND $displayorderadd
复制代码
改成
WHERE t.fid in(select fid from {$tablepre}pre_forum_forum where fup='{$_G['fid']}' or fid='{$_G['fid']}') $filteradd AND $displayorderadd