HTML::Table::FromDatabaseA subclass of HTML::Table to easily generate a HTML table from the result of a database query | |
Download |
HTML::Table::FromDatabase Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Publisher Name:
- David Precious
- Publisher web site:
- http://search.cpan.org/~bigpresh/
HTML::Table::FromDatabase Tags
HTML::Table::FromDatabase Description
A subclass of HTML::Table to easily generate a HTML table from the result of a database query HTML::Table::FromDatabase subclasses HTML::Table, providing a quick and easy way to produce HTML tables from the result of a database query.Developer commentsI often find myself writing scripts which fetch data from a database and present it in a HTML table; often resulting in pointlessly repeated code to take the results and turn them into a table.HTML::Table itself helps here, but this module makes it even simpler.Column headings are taken from the field names returned by the query, unless overridden with the -override_headers or -rename_headers options.All options you pass to the constructor will be passed through to HTML::Table, so you can use all the usual HTML::Table features.SYNOPSIS my $sth = $dbh->prepare('select * from my_table') or die "Failed to prepare query - " . $dbh->errstr; $sth->execute() or die "Failed to execute query - " . $dbh->errstr; my $table = HTML::Table::FromDatabase->new( -sth => $sth ); $table->print; Requirements: · Perl
HTML::Table::FromDatabase Related Software