当前位置: 动力学知识库 > 问答 > 编程问答 >

php - MySQL Error: Unknown system variable CHARACTER_SET

问题描述:

I am using CHARACTER_SET utf8 in sql execution part and i got an error, MySQL Error: Unknown system variable CHARACTER_SET

Here is the code,

 $this->runQuery('execute','SET CHARACTER_SET utf8'); // error getting this line.

网友答案:

There is no CHARACTER_SET variable, use CHARACTER SET instead -

SET CHARACTER SET utf8;
网友答案:

You can set character using SET NAMES 'utf8';

for more info refer http://dev.mysql.com/doc/refman/5.0/en/charset-syntax.html

分享给朋友:
您可能感兴趣的文章:
随机阅读: