mirror of
https://github.com/dg/dibi.git
synced 2025-08-26 07:24:25 +02:00
This commit is contained in:
@@ -93,20 +93,17 @@ class DibiMySqlDriver extends NObject implements DibiDriverInterface
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (empty($config['socket'])) {
|
||||
$host = $config['host'] . (empty($config['port']) ? '' : ':' . $config['port']);
|
||||
} else {
|
||||
$host = ':' . $config['socket'];
|
||||
}
|
||||
|
||||
NException::catchError('DibiDatabaseException');
|
||||
if (empty($config['persistent'])) {
|
||||
$this->connection = @mysql_connect($host, $config['username'], $config['password'], TRUE, $config['options']);
|
||||
} else {
|
||||
$this->connection = @mysql_pconnect($host, $config['username'], $config['password'], $config['options']);
|
||||
}
|
||||
NException::restore();
|
||||
|
||||
if (!is_resource($this->connection)) {
|
||||
throw new DibiDatabaseException(mysql_error(), mysql_errno());
|
||||
|
Reference in New Issue
Block a user