Hello all, i'm would like to know if there is a method to split up records from a database into multiple HTML pages.
Splitting Records into HTML Pages from a database
Collapse
X
-
There are ways to do most anything you want. Can you post some samples of the data you are extracting and also explain what you are trying to do? Try to code it and if you get stuck, post your code here and we will help you, but you have to try to code it first.
Regards,
Jeff -
Code:#!/usr/bin/perl -w $|++; use strict; use DBI; use CGI; use POSIX; my $limit; if (!$limit) { $limit=0; my $dbh = DBI->connect($dbname, $dbusername, $dbpassword) or die ("Connection to database failed.\n"); my $sql="select * from table"; my $sth=$dbh->prepare($sql); $sth->execute; my $results=$sth->rows; my $results_per_page = 10; my $pagesrequired = ceil($results / $results_per_page); my $sth1=$dbh->prepare("select * from table limit $limit,$results_per_page"); $sth->execute display first 10 records on 1 web page this is where i get stuck }Comment
-
Data::Page - help when paging through sets of results
Data::Paginate - Perl extension for complete and efficient data pagination
Comment
Comment