@@ 56-60 (lines=5) @@ | ||
53 | $options = $this->getOptions(); |
|
54 | ||
55 | // if port is specified use it, otherwise use the SqlServer default |
|
56 | if (empty($options['port'])) { |
|
57 | $dsn = 'sqlsrv:server=' . $options['host'] . ';database=' . $options['name']; |
|
58 | } else { |
|
59 | $dsn = 'sqlsrv:server=' . $options['host'] . ',' . $options['port'] . ';database=' . $options['name']; |
|
60 | } |
|
61 | $dsn .= ';MultipleActiveResultSets=false'; |
|
62 | ||
63 | $driverOptions = []; |
|
@@ 110-114 (lines=5) @@ | ||
107 | $options = $this->getOptions(); |
|
108 | ||
109 | // if port is specified use it, otherwise use the SqlServer default |
|
110 | if (empty($options['port'])) { |
|
111 | $dsn = 'dblib:host=' . $options['host'] . ';dbname=' . $options['name']; |
|
112 | } else { |
|
113 | $dsn = 'dblib:host=' . $options['host'] . ':' . $options['port'] . ';dbname=' . $options['name']; |
|
114 | } |
|
115 | ||
116 | $driverOptions = [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]; |
|
117 |