Code looks like this
Code: Select all
$host="localhost";
$user="xxx";
$password="xxx";
mysql_connect($host,$user,$password);
$sql="show status";
$result = mysql_query($sql);
if ($result == 0)
echo "<b>Error " . mysql_errno() . ": ". mysql_error() . "</b>";
else
{
echo "<table border=1>";
echo "<tr><td><b>Variable_name</b></td><td><b>Value</b></td></tr>";
for ($i = 0; $i < mysql_num_rows($result); $i++) {
echo "<TR>";
$row_array = mysql_fetch_row($result);
for ($j = 0; $j < mysql_num_fields($result); $j++) {
echo "<TD>" . $row_array[$j] . "</td>";
}
echo "</tr>";
}
}
Teemu Koistinen