summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysqli/mysqli_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-02-28 13:44:54 +0100
committerAndrey Andreev <narf@bofh.bg>2012-02-28 13:44:54 +0100
commit9ab8d20ca8249047d2228ba183059d69b20a4e0d (patch)
tree78cea3d789f89bfd84d9ab50a4d1b832fbbf8295 /system/database/drivers/mysqli/mysqli_driver.php
parentbcdcc3f3d2973ee23a35baffa6b5928772e20c8a (diff)
parent0aa8c60ae7eee0122c42ae17d42fd5471a575743 (diff)
Merge upstream branch
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;
}
// --------------------------------------------------------------------