summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-02-07 19:05:59 +0100
committerDerek Jones <derek.jones@ellislab.com>2008-02-07 19:05:59 +0100
commita47a2e26f3e8bcf96657ac343c224bd592ed32f8 (patch)
treea5e9ea8d0a6a6e04e43a0f3e7d62df3e7d492ef4
parent7825526a596b0db6a15fac519cf45e2e929c684d (diff)
added functionality for setting client character set and collation in MySQLi driver
-rw-r--r--system/database/drivers/mysqli/mysqli_driver.php3
-rw-r--r--user_guide/changelog.html7
2 files changed, 7 insertions, 3 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)."'");
}
// --------------------------------------------------------------------
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 974c30dae..529ceeae5 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -66,7 +66,12 @@ Change Log
<ul>
<li>Added <a href="./database/active_record.html#caching">Active Record Caching</a>.</li>
<li>Made Active Record fully database-prefix aware</li>
- </ul>
+ </ul>
+ </li>
+ <li>Database drivers
+ <ul>
+ <li>Added support for setting client character set and collation for MySQLi</li>
+ </ul>
</li>
<li>Core Changes
<ul>