mysql_stat

(PHP 4 >= 4.3.0, PHP 5)

mysql_statȡ�õ�ǰϵͳ״̬

˵��

mysql_stat ([ resource $link_identifier ] ) : string

mysql_stat() ���ص�ǰ������״̬��

Note:

mysql_stat() Ŀǰֻ���� uptime��threads��queries��open tables��flush tables �� queries per second��Ҫ�õ�����״̬�����������б�ֻ��ʹ�� SQL ���� SHOW STATUS��

Example #1 mysql_stat() ����

<?php
$link 
mysql_connect('localhost'"mysql_user""mysql_password");
$status explode('  'mysql_stat($link));
print_r($status);
?>

�������ӽ��������������

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
)