Join Up!
96806 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousmysql_select_dbmysql_tablenamenext
Last updated: Tue, 29 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Czech | Finnish | German

mysql_stat

(PHP 4 CVS only)

mysql_stat -- Get current system status

Description

string mysql_stat ( [resource link_identifier])

mysql_stat() returns the current server status.

Nota: mysql_stat() currently only returns 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 STATUS SQL command.

Ejemplo 1. mysql_stat() example

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

The above example would produce the following output:
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
)

User Contributed Notes
mysql_stat
add a note about notes
There are no user contributed notes for this page.
previousmysql_select_dbmysql_tablenamenext
Last updated: Tue, 29 Oct 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST