summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysqli
diff options
context:
space:
mode:
authorJamie Rumbelow <jamie@jamierumbelow.net>2012-02-28 16:40:18 +0100
committerJamie Rumbelow <jamie@jamierumbelow.net>2012-02-28 16:40:18 +0100
commit576b47e9947d4f5bc25a3f72e3978a3d7f9ca1de (patch)
tree286194a87e7388970e3e546fabb0690e0a349342 /system/database/drivers/mysqli
parentae123e0b3d749a13d8820d0a6b773ca25b0ed380 (diff)
parent0aa8c60ae7eee0122c42ae17d42fd5471a575743 (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'system/database/drivers/mysqli')
-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 f2d679f43..ff3a70b04 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;
}
// --------------------------------------------------------------------