diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-02-24 10:52:16 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-02-24 10:52:16 +0100 |
commit | a19fb3eea3591f7ee38fec1c64ded0ea0e2f5885 (patch) | |
tree | af12b10da8a580df4811a7291897b093f4b7f5bd /system/database/drivers/mysqli | |
parent | 15e0fb578dd70438873e6f70265ac09eea5dfdd7 (diff) | |
parent | 5148029aaf204fb3e7e4f24a794bee781d0c218b (diff) |
Merge upstream branch
Diffstat (limited to 'system/database/drivers/mysqli')
-rw-r--r-- | system/database/drivers/mysqli/mysqli_driver.php | 16 |
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; } // -------------------------------------------------------------------- |