修复QQ互联登陆出现(1054) Unknown column 'conuintoken' in 'field list'-Discuz教程下载

修复QQ互联登陆出现(1054) Unknown column 'conuintoken' in 'field list'

开通本站Svip会员,全站资源免费下
155954mgqabcjmddgbcfqg.jpg
这个可能很多人都看到了吧,其实就是数据common_member_connect少了一个字段conuintoken。添加好就行,字段约束 为char(32)。

简单的修复方法为:
1、修改config/config_global.php文件查找下面代码把0改为1,开启后台直接运行SQL
  1. $_config['admincp']['runquery'] = '0';
复制代码
2、在后台后台——站长——数据库——升级,粘贴以下代码提交:
  1. alter table  pre_common_member_connect add   conuintoken  char(32) not null;
  2. alter table  pre_common_connect_guest add   conuintoken  char(32) not null;
复制代码
-如果数据表前缀不是默认的pre,请改为相应的表前缀

如果你想看更详细的解析以及原理,来学习下,可以访问详细帖子:
方法二:数据库里边修改(不想碰数据库无视这个)
大家用mysql管理工具(其实大家基本上用PMA,其他可能都没听过,呵呵)。找到你的数据库,找到表common_member_connect
查看表信息是:
ield             Type                   Collation       Null    Key     Default  Extra   Privileges                       Comment  
----------------  ---------------------  --------------  ------  ------  -------  ------  -------------------------------  ---------
uid               mediumint(8) unsigned  (NULL)          NO      PRI     0                select,insert,update,references           
conuin            char(40)               gbk_chinese_ci  NO      MUL                      select,insert,update,references           
conuinsecret      char(16)               gbk_chinese_ci  NO                               select,insert,update,references           
conopenid         char(32)               gbk_chinese_ci  NO      MUL                      select,insert,update,references           
conisfeed         tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references           
conispublishfeed  tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references           
conispublisht     tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references           
conisregister     tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references           
conisqzoneavatar  tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references           
conisqqshow       tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references  
看看上面的字段是不是少了conuintoken?
那么我们加上conuintoken吧,sql语句为
  1. alter table pre_common_member_connect add conuintoken char(32) not null;
复制代码
执行上面的sql语句即可,如果是在全局执行,请加上数据库名,比如数据库名为db,则pre_common_member_connect应为db.pre_common_member_connect
下面再看下表信息:
Field             Type                   Collation                   Null    Key     Default  Extra   Privileges                       Comment  
----------------  ---------------------  --------------         ------  ------  -------  ------  -------------------------------  ---------
uid               mediumint(8) unsigned  (NULL)          NO      PRI     0                select,insert,update,references           
conuin            char(40)               gbk_chinese_ci     NO      MUL                      select,insert,update,references           
conuinsecret      char(16)               gbk_chinese_ci  NO                               select,insert,update,references           
conopenid         char(32)               gbk_chinese_ci  NO      MUL                      select,insert,update,references           
conisfeed         tinyint(1) unsigned    (NULL)             NO              0                select,insert,update,references           
conispublishfeed  tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references           
conispublisht     tinyint(1) unsigned    (NULL)            NO              0                select,insert,update,references           
conisregister     tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references           
conisqzoneavatar  tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references           
conisqqshow       tinyint(1) unsigned    (NULL)          NO              0                select,insert,update,references           
conuintoken      char(32)             gbk_chinese_ci        NO            (NULL)           select,insert,update,references   
最后红色部分就是我们那天sql语句执行增加的,当然也可以直接用数据库操作工具添加,不用写sql,但这个sql很简单。
另外一个同样的道理

全部评论 0

您需要登录后才可以回帖 立即登录
登录
0
0
0
返回顶部