this query returns only one record containing one field ...
why put it out in a table?
in my example I assume you select one field from many records which produces a table with 1 column and n rows.
(db query execution depending on your db)
[...]
$result = ??_exec($query, $connection);
echo "<table border=1>\n";
while($record = ??_fetch_array($result))
{
echo "<tr><td>".$record[0]."</td></tr>\n";
}
echo "</table>\n";
note that it's depending on the database you use ("??") (see database reference in the php doc for this; read the postings, too).