新闻中心

Discuz教程:ucenter的用户数与论坛显示会员数不一致

作者 / 无忧主机 时间 2015-06-08 14:51:04

最近有个别无忧主机php空间discuz站长朋友遇到这么个奇怪的问题,无忧小编就那其中一个例子来说把,由于之前有一段时间论坛发现被恶意灌水了,于是就恢复了最近的备份,其中ucernter的备份和论坛的备份时期是不一样的。ucenter的备份是比论坛的备份要早好几个月。由于时间不同,小编想要测试一下,如果注册一个新会员,会员数是会往目前数量上加1,还是ucenter备份的时间上加1呢?小编试着新注册一个会员,发现会员的UID是接着ucenter的备份时间。这样就出问题了:ucenter的用户总数与论坛显示的会员不一致。我们知道,很多网站出现过由于计划任务的每日用户表优化自动执行遇到以下报错:Column count doesn't match value count at row,将提示信息的pre_common_member、pre_common_member_status这两个表的归档表删除,并以主表为基准手工 新建了两个和主表数据一致的归档表,然后自动执行计划任务的每日用户表优化就正常了,但是如此操作之后会造成UC中心的用户总数与论坛显示的会员总数不一 致的情况,这个时候我们可以尝试将存档表合并到主表中,可以执行以下sql语句:

insert into pre_common_member select * from pre_common_member_archive;
insert into pre_common_member_count select * from pre_common_member_count_archive;
insert into pre_common_member_field_forum select * from 
pre_common_member_field_forum_archive;
insert into pre_common_member_field_home select * from 
pre_common_member_field_home_archive;
insert into pre_common_member_profile select * from pre_common_member_profile_archive;
insert into pre_common_member_status select * from pre_common_member_status_archive;
继续接着再执行以下sql语句:
TRUNCATE TABLE `pre_common_member_archive`;
TRUNCATE TABLE `pre_common_member_count_archive`;
TRUNCATE TABLE `pre_common_member_field_forum_archive`;
TRUNCATE TABLE `pre_common_member_field_home_archive`;
TRUNCATE TABLE `pre_common_member_profile_archive`;
TRUNCATE TABLE `pre_common_member_status_archive`;
这样就可以了。 无忧主机相关文章推荐阅读: DISCUZ教程:修改安全密码 DISCUZ教程:彻底卸载内置插件再重新安装 新安装DISCUZ存在应用ID共享BUG的最终解决方法

本文地址:https://www.51php.com/discuz/19542.html

1
1
1
1
1
1
1

客户服务热线

0791-8623-3537

在线客服