[Oc-pm] Im new to PM
Chris Grau
chris at chrisgrau.com
Thu Jul 23 17:18:35 PDT 2009
Welcome!
On Thu, Jul 23, 2009 at 05:02:37PM -0700, ealonw wrote:
> Does anyone have a good tutorial on perl pagination using DBI? I have
> Mysql running and I want to paginate the SELECT to HTML
The last time I had to paginate database results on HTML, I used the
Data::Page[1] module. If you're asking about just getting the database
results into HTML in the first place, there are a handful of frameworks
that specialize in this, Maypole and Catalyst come immediately to mind.
Searching for "perl crud[2]" may turn up some information on that.
I've generally never needed to dump data directly to the web, and when
I've done it for testing, it's never been fancier than,
$sth->execute;
$sth->bind_columns( \$field1, ... );
while ( $sth->fetch ) {
print q(<tr>);
print qq(<td>$field1</td>);
# etc.
print q(<tr>);
}
[1] http://search.cpan.org/dist/Data-Page/
[2] Create, Read, Update, and Delete
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.pm.org/pipermail/oc-pm/attachments/20090723/33523b2a/attachment.bin>
More information about the Oc-pm
mailing list