v5:reference:connection:serverinfo
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| v5:reference:connection:serverinfo [2023/06/04 11:52] – Improve description dregad | v5:reference:connection:serverinfo [2026/02/18 15:40] (current) – [Description] mnewnham | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| ===== Description ===== | ===== Description ===== | ||
| - | The function returns an array with general information about the database server. | + | The function returns an array with general information about the database server. The array contains 2 mandatory keys, and may also contain additional database-specific information. If writing portable applications, |
| ^ Key ^ Description | ^ Key ^ Description | ||
| Line 13: | Line 13: | ||
| | '' | | '' | ||
| - | Additional, driver-specific keys may be present. | + | ===== Usage ===== |
| - | <WRAP clear/> | + | <code php> |
| - | <WRAP tip> | + | /* |
| - | In portable applications, | + | * Connecting to a SQL Server database |
| - | </WRAP> | + | */ |
| + | |||
| + | $info = $db->serverInfo(); | ||
| + | |||
| + | print_r($info) | ||
| + | /* | ||
| + | * Returns | ||
| + | Array | ||
| + | ( | ||
| + | [description] => test-sqlserver.local connected | ||
| + | [version] => 17.00.0925 | ||
| + | ) | ||
| + | */ | ||
| + | </code> | ||
v5/reference/connection/serverinfo.txt · Last modified: by mnewnham
