mirror of
https://github.com/dg/dibi.git
synced 2025-10-24 11:16:08 +02:00
* better syntax highlighting
* all drivers checks for extension in constructor * DibiMySqlDriver - charset is set by mysql_set_charset * DibiMySqliDriver - charset is set by mysqli_set_charset
This commit is contained in:
@@ -52,6 +52,18 @@ class DibiMsSqlDriver extends NObject implements DibiDriverInterface
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @throws DibiException
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
if (!extension_loaded('mssql')) {
|
||||
throw new DibiDriverException("PHP extension 'mssql' is not loaded");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Connects to a database
|
||||
*
|
||||
@@ -64,11 +76,6 @@ class DibiMsSqlDriver extends NObject implements DibiDriverInterface
|
||||
DibiConnection::alias($config, 'password', 'pass');
|
||||
DibiConnection::alias($config, 'host');
|
||||
|
||||
if (!extension_loaded('mssql')) {
|
||||
throw new DibiException("PHP extension 'mssql' is not loaded");
|
||||
}
|
||||
|
||||
|
||||
if (empty($config['persistent'])) {
|
||||
$this->connection = @mssql_connect($config['host'], $config['username'], $config['password'], TRUE);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user