The mysql_get_server_info() function returns information of mysql server.
PHP mysql_get_server_info() Function Example:
The mysql_get_server_info() function returns information of mysql server. This function returns version of the mysql server on success, or false for failure.
Syntax:
mysql_get_server_info(connection)
Where connection is optional. The connection specifies the mysql connection.
Example:
<?php $connection = mysql_connect("localhost", "root", "root"); if (!$connection) { die('PHP Mysql database connection could not connect : ' . mysql_error()); } echo "MySQL server info: " . mysql_get_server_info($connection); mysql_close($connection); ?>
After running this example the browser output is:
Output:
MySQL server info: 5.0.19-nt
[ 0 ] Comments