I often see something similar to this below in PHP scripts using MySQL
query(\"SET NAMES utf8\");
I have never had to do this for any pr
Instead of doing this via an SQL query use the php function: mysqli::set_charset mysqli_set_charset
Note: This is the preferred way to change the charset. Using mysqli_query() to set it (such as SET NAMES utf8) is not recommended.
See the MySQL character set concepts section for more information.
from http://www.php.net/manual/en/mysqli.set-charset.php