Home > Database > Mysql Tutorial > mysql点滴_02程序中执行sql语句报字符集问题解决_MySQL

mysql点滴_02程序中执行sql语句报字符集问题解决_MySQL

WBOY
Release: 2016-06-01 13:04:04
Original
1005 people have browsed it

程序中执行 "SELECT t.EVENT_TYPE_ID FROM RATABLE_EVENT_TYPE t WHERE t.NAME='帐期末费用转移事件'" 报错
错误码:1267 不合法的混合字符集。
错误信息:mix of collations (gbk_bin,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
解决办法:用binary()函数统一字符集 SELECT t.EVENT_TYPE_ID FROM RATABLE_EVENT_TYPE t WHERE t.NAME=binary('帐期末费用转移事件')

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template