From a47a2e26f3e8bcf96657ac343c224bd592ed32f8 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Thu, 7 Feb 2008 18:05:59 +0000 Subject: added functionality for setting client character set and collation in MySQLi driver --- system/database/drivers/mysqli/mysqli_driver.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'system/database/drivers') diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 31c27117c..b6d1cba77 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -96,8 +96,7 @@ class CI_DB_mysqli_driver extends CI_DB { */ function db_set_charset($charset, $collation) { - // TODO - add support if needed - return TRUE; + return @mysqli_query($this->conn_id, "SET NAMES '".$this->escape_str($charset)."' COLLATE '".$this->escape_str($collation)."'"); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b