Home > PHP > Function > MySQL > mysql_stat()

mysql_stat()

mysql_stat - Get current system status

Syntax

string mysql_stat (resource $link_identifier)

Arguments

  • link_identifier - The MySQL connection. If the link identifier is not specified, the last link opened by mysql_connect() is assumed. If no such link is found, it will try to create one as if mysql_connect() was called with no arguments. If no connection is found or established, an E_WARNING level error is generated.

Description

mysql_stat() returns the current server status.

Version

PHP 4.3.0, 5

Return value

Returns a string with the status for uptime, threads, queries, open tables, flush tables and queries per second. For a complete list of other status variables, you have to use the SHOW STATUSSQL command. If link_identifier is invalid, NULL is returned.