summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysqli/mysqli_driver.php
diff options
context:
space:
mode:
authorMike Funk <mfunk@xulonpress.com>2012-02-24 15:23:19 +0100
committerMike Funk <mfunk@xulonpress.com>2012-02-24 15:23:19 +0100
commitbaf07dd56b15e7c11025fd29a922c6cbb716da29 (patch)
tree3f818473d1c0d011ab4a981129aff9798155d015 /system/database/drivers/mysqli/mysqli_driver.php
parent27a536dd3570f867ef807ab12391da032b32f09a (diff)
parent5148029aaf204fb3e7e4f24a794bee781d0c218b (diff)
Merge branch 'develop' of https://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'system/database/drivers/mysqli/mysqli_driver.php')
-rw-r--r--system/database/drivers/mysqli/mysqli_driver.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index a79b2a4ad..dbba12e15 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -119,11 +119,23 @@ class CI_DB_mysqli_driver extends CI_DB {
/**
* Select the database
*
+ * @param string database name
* @return bool
*/
- public function db_select()
+ public function db_select($database = '')
{
- return @mysqli_select_db($this->conn_id, $this->database);
+ if ($database === '')
+ {
+ $database = $this->database;
+ }
+
+ if (@mysqli_select_db($this->conn_id, $database))
+ {
+ $this->database = $database;
+ return TRUE;
+ }
+
+ return FALSE;
}
// --------------------------------------------------------------------