+ -
当前位置:首页 → 问答吧 → 收藏 中文用户名登陆有误,字符编码问题,怎么弄?

收藏 中文用户名登陆有误,字符编码问题,怎么弄?

时间:2011-09-09

来源:互联网

[Type] 查询语句错误
  [1267] Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
  [Query] SELECT count, lastupdate FROM common_failedlogin WHERE ip='218.79.226.160' AND username='上海'

Program messages:  

  [Line: 0030]admin.php(discuz_admincp->init)
  [Line: 0056]source/class/class_admincp.php(discuz_admincp->check_cpaccess)
  [Line: 0124]source/class/class_admincp.php(discuz_admincp->check_user_login)
  [Line: 0165]source/class/class_admincp.php(logincheck)
  [Line: 0113]source/function/function_member.php(DB::fetch_first)

作者: jie2002   发布时间: 2011-09-09

set names gbk 试试
show variables like 'char%'; 
show create table common_failedlogin

作者: wwwwb   发布时间: 2011-09-09

检查你的字符集设置。

set names 'gbk'; 试一下先。


http://blog.csdn.net/ACMAIN_CHM/archive/2009/05/12/4174186.aspx
MySQL 中文显示乱码

作者: ACMAIN_CHM   发布时间: 2011-09-09