summaryrefslogtreecommitdiff
path: root/sqlbox/view.php
diff options
context:
space:
mode:
authorJan Klemkow <j.klemkow@wemelug.de>2012-11-21 11:58:37 +0100
committerJan Klemkow <j.klemkow@wemelug.de>2012-11-21 11:58:37 +0100
commita4d8c7f7b7670dd7ac2a8c09441b522ea4fa11a4 (patch)
treee5460fbddf87b20877dc14fa9ac6d9a9701af2a0 /sqlbox/view.php
parent854159ddbf2c284118a83495e215a178f2bf39e9 (diff)
downloadsqltutor-plugin-a4d8c7f7b7670dd7ac2a8c09441b522ea4fa11a4.tar.gz
sqltutor-plugin-a4d8c7f7b7670dd7ac2a8c09441b522ea4fa11a4.tar.bz2
sqltutor-plugin-a4d8c7f7b7670dd7ac2a8c09441b522ea4fa11a4.zip
Query output format as table.
Diffstat (limited to 'sqlbox/view.php')
-rw-r--r--sqlbox/view.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/sqlbox/view.php b/sqlbox/view.php
index e9e4ba6..c6f99a1 100644
--- a/sqlbox/view.php
+++ b/sqlbox/view.php
@@ -88,10 +88,15 @@ if (isset($data->query)) {
if (!$result)
error("Query failed!");
+ echo "<table>";
while($row=pg_fetch_row($result)){
- print_r($row);
- echo "<br />\n";
+ echo "<tr>";
+ foreach($row as $val) {
+ echo "<td>$val</tr>";
+ }
+ echo "</tr>";
}
+ echo "</table>";
}
// Finish the page