diff options
-rw-r--r-- | sqlbox/view.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sqlbox/view.php b/sqlbox/view.php index 8cf6848..dd20fb9 100644 --- a/sqlbox/view.php +++ b/sqlbox/view.php @@ -89,6 +89,10 @@ if (isset($data->query)) { error("Query failed!"); echo "<table border=\"1\">"; + $n = pg_num_fields($result); + for ($i = 0; $i < $n; $i++) { + echo "<th>".pg_field_name($result, $i)."</th>"; + } while($row=pg_fetch_row($result)){ echo "<tr>"; foreach($row as $val) { |