Commit 4cea38e0 authored by David Staley's avatar David Staley

Added in a new method for checking pdo drivers

Added in a more dynamic method for checking whether to use dblib or
sqlsrv drivers for a mssql pdo connection. This is to make local mac
devs work well with windows prod machines.
parent f25d09dd
......@@ -30,7 +30,7 @@ class SQLServer extends Connector {
$port = (isset($port)) ? ','.$port : '';
//check for dblib for mac users connecting to mssql (utilizes freetds)
if (!empty($dsn_type) and $dsn_type == 'dblib')
if (in_array('dblib',PDO::getAvailableDrivers()))
{
$dsn = "dblib:host={$host}{$port};dbname={$database}";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment