- UCenter info: MySQL Query Error
- SQL:SELECT * FROM [Table]members WHERE username=''
- Error:Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
- Errno:1267
复制代码
此问题以解决:解决方法
解决ERROR 1267 (HY000): Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'like'
出现这个错误是因为编码不一致造成的
如查询:
<font style="background-color:#fdfddf">SELECT * FROM `dede_archives` WHERE `title` LIKE '%font>
出现错误!
那么解决也简单
设置编码
如运行:
mysql> set names gbk;
在运行就不会错误了!
解决ERROR 1267 (HY000): Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'like'完毕! |