".$db."
";
echo "Query: ".$query."";
echo "Results
";
if ($result == 0)
echo("Error " . mysql_errno() . ": " . mysql_error() . "");
elseif (@mysql_num_rows($result) == 0)
echo("Query completed. No results returned.
");
else
{
echo "
";
for ($i = 0; $i < mysql_num_fields($result); $i++)
{
echo("| " . mysql_field_name($result,$i) . " | ");
}
echo "
";
$count=0;
for ($i = 0; $i < mysql_num_rows($result); $i++)
{
echo "";
$row = mysql_fetch_row($result);
for ($j = 0; $j < mysql_num_fields($result); $j++)
{
echo("| " . $row[$j] . " | ");
}
$count++;
echo "
";
}
echo "
";
echo "Count=".$count;
}
?>