diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-02-24 10:56:52 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-02-24 10:56:52 +0100 |
commit | 99cfa80a4d637892930505650c3f6cf74ae3a300 (patch) | |
tree | 13f9a9ad2c8f2e92fcb21f34b60cf364eee47d88 /system/database/drivers/mysqli | |
parent | c4fcb6ac466173696f765d3c7ca16b823d2cb04e (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; } // -------------------------------------------------------------------- |