Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to put links on the bottom of my pages on my image gallery to flip back and forth between pages. I'm showing 15 images per page which is sucked from MySQL. I'd like to say I'm going to be pulling them out with just the ID field but I think I'll have it sortable by other fields (date, name, etc) and I'm not sure how that'll affect anything.
How can I print the number of pages in links ("script.pl?page=1&orderby=id" page 1 | "script.pl?page=2&orderby=id", etc) and then have a reference point from where I left off previously?
My initial idea was to sort by the field, do a counter and ignore the first 15 per page (so if it were page 2, it'd ignore the first 30). I know there's probably a better way and I'm looking forward to seeing how you guys would solve this problem.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: how to put links on the bottom of an image gallery
by atemon (Chaplain) on Aug 27, 2007 at 01:59 UTC | |
by sulfericacid (Deacon) on Aug 27, 2007 at 02:10 UTC | |
by atemon (Chaplain) on Aug 27, 2007 at 02:25 UTC | |
by misc (Friar) on Aug 27, 2007 at 10:08 UTC |
Back to
Seekers of Perl Wisdom