mysql_get_server_info() function in PHP

What is mysql_get_server_info() function in PHP?
How does mysql_get_server_info() works?

Explanation

The mysql_get_server_info() function gets information about the MySQL server.
Syntax
string mysql_get_server_info ( [resource link_identifier])

Returns a string describing the MySQL server information or FALSE on failure.
mysql_get_server_info() returns the MySQL server version used by connection link_identifier. If link_identifier is omitted, the last opened connection will be used.
Example

<?php
//print MySQL server information
printf("MySQL server version: %sn", mysql_get_server_info());
?>

RESULT:
MySQL server version: 4.0.1-alpha
See also:
mysql_get_client_info(), mysql_get_host_info() and mysql_get_proto_info().


PHP Topics


Ask Questions

Ask Question