chiark / gitweb /
New dumpqueryresults component for handy debugging etc.
[ypp-sc-tools.db-test.git] / yarrg / web / dumpqueryresults
diff --git a/yarrg/web/dumpqueryresults b/yarrg/web/dumpqueryresults
new file mode 100644 (file)
index 0000000..c653d81
--- /dev/null
@@ -0,0 +1,20 @@
+<%args>
+$sth
+</%args>
+<table frame=box rules=all>
+<tr>
+% foreach my $field (@{ $sth->{NAME} }) {
+<th><% $field |h %>
+% }
+</tr>
+% my @row;
+% while (@row=$sth->fetchrow_array) {
+<tr>
+% foreach my $cell (@row) {
+<td>
+<% $cell |h %>
+</td>
+% }
+</tr>
+% }
+</table>