1
0
mirror of https://github.com/dg/dibi.git synced 2025-02-24 02:43:09 +01:00

MySQLi driver: added support for persistent connection [Closes #27]

This commit is contained in:
David Grudl 2011-02-02 22:39:52 +01:00
parent 568ec80994
commit 60b62c50fe

View File

@ -109,7 +109,7 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver, IDibiResultDri
}
}
}
@mysqli_real_connect($this->connection, $config['host'], $config['username'], $config['password'], $config['database'], $config['port'], $config['socket'], $config['flags']); // intentionally @
@mysqli_real_connect($this->connection, (empty($config['persistent']) ? '' : 'p:') . $config['host'], $config['username'], $config['password'], $config['database'], $config['port'], $config['socket'], $config['flags']); // intentionally @
if ($errno = mysqli_connect_errno()) {
throw new DibiDriverException(mysqli_connect_error(), $errno);