diff options
author | Jan Klemkow <j.klemkow@wemelug.de> | 2012-11-21 11:58:37 +0100 |
---|---|---|
committer | Jan Klemkow <j.klemkow@wemelug.de> | 2012-11-21 11:58:37 +0100 |
commit | a4d8c7f7b7670dd7ac2a8c09441b522ea4fa11a4 (patch) | |
tree | e5460fbddf87b20877dc14fa9ac6d9a9701af2a0 | |
parent | 854159ddbf2c284118a83495e215a178f2bf39e9 (diff) | |
download | sqltutor-plugin-a4d8c7f7b7670dd7ac2a8c09441b522ea4fa11a4.tar.gz sqltutor-plugin-a4d8c7f7b7670dd7ac2a8c09441b522ea4fa11a4.tar.bz2 sqltutor-plugin-a4d8c7f7b7670dd7ac2a8c09441b522ea4fa11a4.zip |
Query output format as table.
-rw-r--r-- | sqlbox/view.php | 9 |
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 |