[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)

解决方案 »

  1.   

    数据库和页面设置相同的字符编码,统一用utf-8编码,执行查询语句前加上mysql_query("SET NAMES 'UTF8'")
      

  2.   

    你还是先把mysql数据库的字符集整整明白吧。latin1_swedish_ci这是瑞典语。写不了中文。
      

  3.   

    这个应该是你在php中使用了iconv函数后出现的提示吧?一般因为iconv无法识别出编码就会给出一个这样的提示.
    所以提交过来的中文请正确的编码,例如UTF-8.这个得看你提交页面的编码以及是用何种方式传递中文.然后再根据自己数据库的编码定义进行相应的转换.