Re: recordsets and "more" (with Perl)

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

 Date:  Thu, 2 Mar 2000 08:20:53 -0800 (PST)
 To:  hwg-languages(at)hwg.org
  todo: View Thread, Original



> If you know the total number of records, you can
> easily divide by your number per page and generate >
links like you do  for the next page.

Right, and you find out your total number of records
by doing the search again, which I guess is
inefficient in that sense but OTOH if the number
changes in between invocations of the script, your
script will find out about it.

My crude little programs even have logic to deal with
the rare but plausible scenario where the start number
is higher than the total number of records:  just
display the last set again and pretend it never
happened.

The point I meant to make was not how to generate
links to the numbered pages -- that much I had figured
out -- but rather, when the number of pages is too
great to fit all those links gracefully on the html
page, then your upscale sites will have numbered
links-to-pages as well as "More" and/or "Previous" 
links. That's the logic part that makes my head hurt: 
how to do that.

=====
David Mintz
        http://www.panix.com/~dmintz
_________________________________________________________
Do You Yahoo!?
Get your free (at)yahoo.com address at http://mail.yahoo.com

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