Quote:
Originally Posted by Falcon Capt
You're awesome! That did it!
Many thanks!
If I already had an open connection elsewhere, what would this code look like?
|
I guess something like:
PHP Code:
function si_mysqlistats($link) {
$status = explode(' ', mysqli_stat($link));
$s = '';
while ( list($k, $v) = each($status) ) {
$s .= $v . '<br />';
}
return $s;
}
and then in the other code:
PHP Code:
print_description_row(si_mysqlstats($link));
but after I posted that I realized that it looks like you're working on code from the admincp or modcp, so you might just be able to use global $db in place of $link, like
PHP Code:
function si_mysqlistats() {
global $db;
$status = explode(' ', mysqli_stat($db));
$s = '';
while ( list($k, $v) = each($status) ) {
$s .= $v . '<br />';
}
return $s;
}
and you wouldn't have to change the other code.