问题描述:

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

相关阅读:
Top