首页| 版块| 我的| 发帖| 消息
主题:2016年1月15日:修正电脑版论坛统计数据主题数和帖子数误差(部分与拆分操作有关)
zhangjingyu 
“不记得了,可能站点信息就是从这个表里获取的数据。”(引用内容)index.php
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'];应该是的,这个不研究了:只要 pw_forumdata表里的数据准确了,自然其它需要从这个表里获取数据的地方的数据都是准确的。
zhangjingyu回帖于2019-01-19 08:56[查看电脑版]
下一楼»:添加本版块帖子数记录字段
ALTER TABLE `pw_forumdata` ADD `benban` int(10) NOT NULL DEFA ..
«上一楼:研究了半天,感觉有点儿麻烦啊。由于33(版块fid,下同)和18是15的子版块,32是14的子版块,19 ..

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