Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^4: Perl Database Paging

by ironside (Acolyte)
on Apr 03, 2014 at 22:43 UTC ( #1081028=note: print w/replies, xml ) Need Help??

in reply to Re^3: Perl Database Paging
in thread Perl Database Paging

Problem solved! Another perl monk was able to help. It turns out the links were the problem. Here is the code that worked:

# page links my $pagelinks; if ($reqpage > 1){ my $prev_page = $reqpage - 1; $pagelinks .= qq! <a href="?reqpage=$prev_page"> Previous </a> !; } for my $pageno (1..$pagecount){ if ($pageno == $reqpage){ $pagelinks .= qq! <strong>$pageno</strong>!; } else { $pagelinks .= qq! <a href="?reqpage=$pageno"> $pageno </a> !; } } if ($reqpage < $pagecount){ my $next_page = $reqpage + 1; $pagelinks .= qq! <a href="?reqpage=$next_page"> Next </a> !; }

Thanks for your input. Much appreciated

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1081028]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (11)
As of 2016-10-28 21:09 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (387 votes). Check out past polls.