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
Next revision
Previous revision
v5:reference:connection:serverinfo [2023/06/04 11:41] – ↷ Page moved from v5:dictionary:serverinfo to v5:reference:connection:serverinfo dregadv5:reference:connection:serverinfo [2026/02/18 15:40] (current) – [Description] mnewnham
Line 7: Line 7:
 ===== Description ===== ===== Description =====
  
-The function ''serverInfo()'' returns 3 items of 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.
-See the below note about portability.+
  
-<WRAP clear/+^ Key  ^ Description 
-<WRAP tip+| ''version''     | Database server's version number | 
-In portable applications, always set the fetch mode to ADODB_FETCH_NUM, as the associative key names are not the same across all databases+| ''description'' | Additional information about the database server | 
-</WRAP>+ 
 +===== Usage ===== 
 + 
 +<code php
 +/* 
 +* Connecting to a SQL Server database 
 +*/ 
 + 
 +$info = $db->serverInfo(); 
 + 
 +print_r($info) 
 +/* 
 +* Returns  
 +Array 
 +
 +    [description] => test-sqlserver.local connected to testdb 
 +    [version] => 17.00.0925 
 +
 +*/ 
 +</code>
  
  
v5/reference/connection/serverinfo.1685871669.txt.gz · Last modified: by dregad