diff options
author | Derek Jones <derek.jones@ellislab.com> | 2008-02-07 19:05:59 +0100 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2008-02-07 19:05:59 +0100 |
commit | a47a2e26f3e8bcf96657ac343c224bd592ed32f8 (patch) | |
tree | a5e9ea8d0a6a6e04e43a0f3e7d62df3e7d492ef4 /system | |
parent | 7825526a596b0db6a15fac519cf45e2e929c684d (diff) |
added functionality for setting client character set and collation in MySQLi driver
Diffstat (limited to 'system')
-rw-r--r-- | system/database/drivers/mysqli/mysqli_driver.php | 3 |
1 files changed, 1 insertions, 2 deletions
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)."'");
}
// --------------------------------------------------------------------
|