mysql_stat()
string mysql_stat([connection])This function returns the status of the server for the current MySQL connection, but you also can use it to get the status for another connection. The function returns—as a space-separated list—the flush tables, open tables, queries, queries per second, threads, and uptime for the server. This function is available as of version 4.3 of PHP. Here is an example:
...
$connection = mysql_connect('localhost',
'jacinta', 'richardson');
$info = explode(' ', mysql_stat($connection));
print_r($info);
...The explode() PHP function lists the
elements of the space-separated values contained in the associative
array generated by mysql_stat() along with
their respective keys.