summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysqli/mysqli_driver.php
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2012-02-27 22:56:39 +0100
committerTimothy Warren <tim@timshomepage.net>2012-02-27 22:56:39 +0100
commit2d87f8458f30057af466cd4b3b5edcf568861691 (patch)
tree37b21f5b14119445a4cf1b3fd338e48f82ac0cdf /system/database/drivers/mysqli/mysqli_driver.php
parent03f8ec00afb0da44c2191c4248832a37f7bd3c1f (diff)
parentd8a0aed00b2174af5cac96ecada10ea392e19120 (diff)
Merge upstream
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;
}
// --------------------------------------------------------------------