From ce4fa77b60ed3aad6dcd09dbd48fd7b119bc1261 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Wed, 21 Nov 2012 12:04:06 +0100 Subject: sqlbox: Show query field names --- sqlbox/view.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sqlbox/view.php') 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 ""; + $n = pg_num_fields($result); + for ($i = 0; $i < $n; $i++) { + echo ""; + } while($row=pg_fetch_row($result)){ echo ""; foreach($row as $val) { -- cgit
".pg_field_name($result, $i)."