Hi ,
The theortical approach would be by :
First get the rows twenty ($start_limit) starting from a variable that is supplied by a flag when it is the first page or a hidden parameter that can be supplied by the submission of
next button at the end of the page for all the other pages .
The page is count incremented for this set
# Just a sample to indicate the flow (untested)
my $pages = $cgi->param{'pages'}||1;
my $start_limit = shift|| $cgi->param {'start_limit'};
# Get the record info starting from the
# $start_limit record and the twenty from it
# print "the records \n";
# print "the $pages at the end of the page ";
$start_limit += $start_limit;
$pages += $pages;
# ALSO pass $start_limit and $pages as the hidden paramete
+rs to the page occuring next to this
This is just to give an idea of what should be a navigation scheme through maintaining hidden parameters between pages and also the part of
select to get the rows within a range which is $start_limit to $start_limit + 20 is done by rownum in oracle and if that is different process it in the perl with $start_limit parameter .The present application which you have written should be posted so that any constructive suggestions could be discussed . Also go through the
CGI::FormBuilder API from the CPAN that shall give you some idea to maintain state too among pages , these are just a few suggestions
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.