note 49802 deleted from function.mysql-stat by nlopess
| From: | nlopess@php.net | Date: | Wed, 09 Feb 2005 16:08:14 +0000 |
| Subject: | note 49802 deleted from function.mysql-stat by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-84727@lists.php.net to get a copy of this message | ||
Note Submitter: adam at gotlinux dot us
----
if you need the complete status as outputted by the "show status" command. Try this
function.
<?
function mysql_status($db=NULL) {
if(!mysql_ping($db))
$db=mysql_connect("localhost","user","password");
$res=mysql_query("show status",$db);
while (list($key,$value)=mysql_fetch_array($res))
$sql[$key]=$value;
return $sql;
}
?>