summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysqli
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/mysqli')
-rw-r--r--system/database/drivers/mysqli/mysqli_driver.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index a79b2a4ad..0b80f55be 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -119,11 +119,12 @@ 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);
+ return @mysqli_select_db($this->conn_id, ($database == '' ? $this->database : $database));
}
// --------------------------------------------------------------------