coldfingertips has asked for the wisdom of the Perl Monks concerning the following question:
I'm pulling records from a database and I need to break it up into managable pages (15 per page for now but I'll change it later if I need). This means page=1 would display items 0-14, page=2 would display 15-29, etc.
Something was wrong with my logic in determining what items are expected to be called on that page and this is where I need your help. I need the calculations to determine the first and the last record needed to be printed based on the url_param page number. I know this is easy but I'm making this harder than it has to.my $page = url_param("page"); if ($page) { my $per_page = 15; my $count_low = $per_page - 1; my $count_high = }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Number of listings per page
by eric256 (Parson) on Feb 22, 2005 at 18:50 UTC | |
|
Re: Number of listings per page
by dragonchild (Archbishop) on Feb 22, 2005 at 18:19 UTC | |
|
Re: Number of listings per page
by brian_d_foy (Abbot) on Feb 22, 2005 at 21:13 UTC | |
|
Re: Number of listings per page
by friedo (Prior) on Feb 22, 2005 at 18:21 UTC | |
|
Re: Number of listings per page
by injunjoel (Priest) on Feb 22, 2005 at 19:31 UTC | |
|
Re: Number of listings per page
by artist (Parson) on Mar 01, 2005 at 22:02 UTC |