mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 00:48:25 +00:00
Added $config['database'] mysqli_connect() in DboMysqli::connect(), removed mysqli_select_db()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4661 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
7cee084212
commit
f8023ff0dc
1 changed files with 1 additions and 6 deletions
|
@ -89,12 +89,7 @@ class DboMysqli extends DboSource {
|
||||||
*/
|
*/
|
||||||
function connect() {
|
function connect() {
|
||||||
$config = $this->config;
|
$config = $this->config;
|
||||||
$this->connection = mysqli_connect($config['host'], $config['login'], $config['password'], null, $config['port']);
|
$this->connection = mysqli_connect($config['host'], $config['login'], $config['password'], $config['database'], $config['port']);
|
||||||
|
|
||||||
if (mysqli_select_db($this->connection, $config['database'])) {
|
|
||||||
$this->connected = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->connected;
|
return $this->connected;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue