Name
mysql_stat( )
Synopsis
mysql_stat([connection
])
This 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 starting with Version 4.3 of PHP.
... $connection = mysql_connect('localhost', 'jacinta', 'richardson'); $info = explode(' ', mysql_stat($connection)); print_r($info); ...
Using the explode( )
PHP function, the elements of
the space-separated values contained in the associative array
generated by mysql_stat( )
are listed along with
their respective keys.
Get MySQL in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.