mysql_stat
(PHP 4 >= 4.3.0, PHP 5)
mysql_stat — 取得当前系统状态
<h3>说明</h3>
 string <strong>mysql_stat</strong>
  ([ resource <code>$link_identifier</code>
] )
<p>
 <strong>mysql_stat()</strong> 返回当前服务器状态。
</p>
<p><strong>Note</strong>:
 <p>
  <strong>mysql_stat()</strong>
  目前只返回
  uptime,threads,queries,open tables,flush tables 和 queries per
  second。要得到其它状态变量的完整列表,只能使用 SQL 命令
  SHOW STATUS。
 </p>
</p>
<p>
  <p><strong>Example #1 <strong>mysql_stat()</strong> 例子</strong></p><?php
$link = mysql_connect('localhost', "mysql_user", "mysql_password");
$status = explode(' ', mysql_stat($link));
print_r($status);
?>
  <p>
   以上例子将产生如下输出:
  </p>
Array
(
    [0] => Uptime: 5380
    [1] => Threads: 2
    [2] => Questions: 1321299
    [3] => Slow queries: 0
    [4] => Opens: 26
    [5] => Flush tables: 1
    [6] => Open tables: 17
    [7] => Queries per second avg: 245.595
)
</p>