NAME
HTMLTable - Make a HTML table from DBI query output.
SYNOPSIS
use DBI::HTMLTable;
&DBI::HTMLTable::HTMLTable ($data, $width);
&DBI::HTMLTable::HTMLTableByRef ($dataref, $width);
DESCRIPTION
The DBI::HTMLTable functions take the results of a DBI query and format it as an HTML table. The second parameter provides the width="" parameter to the <TABLE> tag in the output. If it is omitted, then the table width is the browser's default page width.
The function HTMLTable() uses the query output formatted as a multi-line string. HTMLTableByRef uses a reference to an array of array references, as returned by the DBI fetchall_arrayref() function and similar functions.
$data = $dbh -> selectall_arrayref( "select \* from $db" );
&DBI::HTMLTable::HTMLTableByRef ($data);
An example CGI script is provided in eg/tablequery.cgi in the distribution package.
VERSION
First release, version 0.10 (alpha).
AUTHOR
Robert Kiesling, rkiesling@mainmatter.com