ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:serverinfo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
v5:reference:connection:serverinfo [2023/06/04 11:52] – Improve description dregadv5: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, use driver-specific branches if accessing these additional keys.
  
 ^ Key  ^ Description  ^ ^ Key  ^ Description  ^
Line 13: Line 13:
 | ''description'' | Additional information about the database server | | ''description'' | Additional information about the database server |
  
-Additional, driver-specific keys may be present.+===== Usage =====
  
-<WRAP clear/+<code php
-<WRAP tip+/* 
-In portable applications, always set the fetch mode to ADODB_FETCH_NUM, as the associative key names are not the same across all databases+* Connecting to a SQL Server database 
-</WRAP>+*/ 
 + 
 +$info = $db->serverInfo(); 
 + 
 +print_r($info) 
 +/* 
 +* Returns  
 +Array 
 +
 +    [description] => test-sqlserver.local connected to testdb 
 +    [version] => 17.00.0925 
 +
 +*/ 
 +</code>
  
  
v5/reference/connection/serverinfo.txt · Last modified: by mnewnham