Refactor the connector class.
This commit is contained in:
parent
e81dd68a94
commit
e78a5b0ad3
|
|
@ -79,10 +79,7 @@ private function connect_to_server($config)
|
||||||
{
|
{
|
||||||
$dsn = $config->driver.':host='.$config->host.';dbname='.$config->database;
|
$dsn = $config->driver.':host='.$config->host.';dbname='.$config->database;
|
||||||
|
|
||||||
if (isset($config->port))
|
if (isset($config->port)) $dsn .= ';port='.$config->port;
|
||||||
{
|
|
||||||
$dsn .= ';port='.$config->port;
|
|
||||||
}
|
|
||||||
|
|
||||||
$connection = new \PDO($dsn, $config->username, $config->password, $this->options);
|
$connection = new \PDO($dsn, $config->username, $config->password, $this->options);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue