Re: recordsets and "more" (with Perl)

by David Mintz <mambomintz(at)yahoo.com>

 Date:  Wed, 1 Mar 2000 08:12:02 -0800 (PST)
 To:  hwg-languages(at)hwg.org
  todo: View Thread, Original

I'd be interested in seeing a Perl code example
demonstrating how you do paged output when you have
let's say 800 matching records, and you want to print
let's say 20 matching records per page, and at the
bottom of the page print page numbers linked to other
subsets of those records, i.e., the way most of your
high end web sites do it.

The best I've been able to do for myself so far is put
references to my matching records in an array, keep
track of where I'm starting, and print those records
along with just "Next" and "Previous" links pointing
to the next/previous subset.  The "start" number is
embedded in the query string (along with the search
criteria) of those next/previous URLs, so that the
next invocation of the script knows where to start.
(Of course the next invocation of the script has to
start all over again with the search.) But this way
users can't easily jump let's say 8 pages forward or
backward (unless they know to hack the "start" number
in the query string in the location field).

Clear as mud?  I thought so.

        David Mintz
        http://www.panix.com/~dmintz
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA