Adding fix for Ticket #2214

Removed persistent connection setting in DboMysqli::connect() since there is no persistent connection function for mysqli

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4656 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-03-23 08:57:42 +00:00
parent 2925df7c54
commit 330630c9d0

View file

@ -65,7 +65,7 @@ class DboMysqli extends DboSource {
'password' => '',
'database' => 'cake',
'port' => '3306',
'connect' => 'mysqli_pconnect');
'connect' => 'mysqli_connect');
/**
* Mysqli column definition
*
@ -89,14 +89,7 @@ class DboMysqli extends DboSource {
*/
function connect() {
$config = $this->config;
$connect = $config['connect'];
$this->connected = false;
if (!$config['persistent']) {
$this->connection = mysqli_connect($config['host'], $config['login'], $config['password'], true);
} else {
$this->connection = $connect($config['host'], $config['login'], $config['password']);
}
$this->connection = mysqli_connect($config['host'], $config['login'], $config['password'], null, $config['port']);
if (mysqli_select_db($this->connection, $config['database'])) {
$this->connected = true;