@@ 210-230 (lines=21) @@ | ||
207 | * |
|
208 | * @return string |
|
209 | */ |
|
210 | public function version() |
|
211 | { |
|
212 | if (isset($this->data_cache['version'])) |
|
213 | { |
|
214 | return $this->data_cache['version']; |
|
215 | } |
|
216 | ||
217 | if ( ! $this->conn_id OR ($pg_version = pg_version($this->conn_id)) === FALSE) |
|
218 | { |
|
219 | return FALSE; |
|
220 | } |
|
221 | ||
222 | /* If PHP was compiled with PostgreSQL lib versions earlier |
|
223 | * than 7.4, pg_version() won't return the server version |
|
224 | * and so we'll have to fall back to running a query in |
|
225 | * order to get it. |
|
226 | */ |
|
227 | return isset($pg_version['server']) |
|
228 | ? $this->data_cache['version'] = $pg_version['server'] |
|
229 | : parent::version(); |
|
230 | } |
|
231 | ||
232 | // -------------------------------------------------------------------- |
|
233 |
@@ 264-277 (lines=14) @@ | ||
261 | * |
|
262 | * @return string |
|
263 | */ |
|
264 | public function version() |
|
265 | { |
|
266 | if (isset($this->data_cache['version'])) |
|
267 | { |
|
268 | return $this->data_cache['version']; |
|
269 | } |
|
270 | ||
271 | if ( ! $this->conn_id OR ($info = sqlsrv_server_info($this->conn_id)) === FALSE) |
|
272 | { |
|
273 | return FALSE; |
|
274 | } |
|
275 | ||
276 | return $this->data_cache['version'] = $info['SQLServerVersion']; |
|
277 | } |
|
278 | ||
279 | // -------------------------------------------------------------------- |
|
280 |