| @@ 104-114 (lines=11) @@ | ||
| 101 | ||
| 102 | } |
|
| 103 | ||
| 104 | public function connectMSSQL($config) { |
|
| 105 | $this->checkParam($config); |
|
| 106 | ||
| 107 | try { |
|
| 108 | $db = new PDO("mssql:host=".$config['host'].";dbname=".$config['database'].", ".$config['user'].", ".$config['password']); |
|
| 109 | } catch (PDOException $e) { |
|
| 110 | throw new PotatoException($e->getMessage()); |
|
| 111 | } |
|
| 112 | ||
| 113 | return $db; |
|
| 114 | } |
|
| 115 | ||
| 116 | public function connectSQL($config) { |
|
| 117 | $this->checkParam($config); |
|
| @@ 116-126 (lines=11) @@ | ||
| 113 | return $db; |
|
| 114 | } |
|
| 115 | ||
| 116 | public function connectSQL($config) { |
|
| 117 | $this->checkParam($config); |
|
| 118 | ||
| 119 | try { |
|
| 120 | $db = new PDO($config['type'].":host=".$config['host'].";dbname=".$config['database'].", ".$config['user'].", ".$config['password']); |
|
| 121 | } catch (PDOException $e) { |
|
| 122 | throw new PotatoException($e->getMessage()); |
|
| 123 | } |
|
| 124 | ||
| 125 | return $db; |
|
| 126 | } |
|
| 127 | } |
|
| 128 | ||