Anybody have any idea on how to proceed in order to get a nice formatted
HTML output from a db output :
sub view {
my ($sth, $sql, $rv, $nr_of_fields, $array_ref, $row, $i);
connectToDB();
$sql = qq{SELECT * FROM $table ORDER BY Employee_ID ASC};
$sth = $dbh->prepare( $sql );
$ rv = $sth->execute() or print "Couldn't execute statement: " .
$sth->errstr;
$array_ref = $sth->fetchall_arrayref();
$nr_of_fields = $sth->{NUM_OF_FIELDS}; # returns the number of fields
returned by the query
foreach $row ( @$array_ref ) {
print "<tr bgcolor=#dddddd>";
# for ( $i = 0; $i < $nr_of_fields; $i++ ) {
for $i ( 0 .. $nr_of_fields - 1 ) {
print "<td>@$row[$i] </td>";
}
print "</tr>";
}
$sth->finish;
disconnectFromDB();
}
I would like to replace the print "<td>@$row[$i] </td>"; with a
function from a module like Data::ShowTable.
Any help greatly appreciated.
JL
http://here.at/perl
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web