set the character encoding in the "more proper" way, as recommended by the mysqli manual

This commit is contained in:
Sergey Tsalkov
2011-03-17 13:14:39 -04:00
parent 74feeb6513
commit 449760eb2a

View File

@@ -47,7 +47,7 @@ class DB
if (DB::$dbName != '') $dbName = DB::$dbName;
DB::$current_db = $dbName;
$mysql = new mysqli(DB::$host, DB::$user, DB::$password, $dbName, DB::$port);
DB::queryNull("SET NAMES %s", DB::$encoding);
$mysql->set_charset(DB::$encoding);
}
return $mysql;