I've been working on a project based on CGI::App and I've also been kicking
around the idea of integrating HTML::Pager. So the two really aren't
designed to work together after all?
-phil

----- Original Message -----
From: "Sam Tregar" <[EMAIL PROTECTED]>
To: "Mark Stosberg" <[EMAIL PROTECTED]>
Cc: "HTML-Template Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, January 29, 2002 10:34 AM
Subject: Re: [htmltmpl] Two HTML::Pager questions


> On Tue, 29 Jan 2002, Mark Stosberg wrote:
>
> > I have a couple of questions regarding the HTML::Pager module, which
> > uses  HTML::Template:
> >
> > * Has anyone thought about recrafting this as a CGI::Application app?
>
> Dunno.  It has to integrate pretty tightly with the application that uses
> it and it only really has one run-mode...  Maybe it could re-designed as a
> module that generates a run-mode for a CGI::App.  Um, I wonder how that
> would work.
>
> > * From the documentation, it appears that the whole result set needs to
> > be available even though I'm just displaying a subset of it. Is this
> > correct?
>
> No, just the count of all the results to be paged through.
>
> > I think Postgres and MySQL now both support a better
> > alternative using the "LIMIT" feature. I can run one SQL statement to
> > find out that I would get back 2000 rows, and a second statement to get
> > back only rows 10 through 20 of the result set. Does the current feature
> > set support this model.
>
> Right, that's one way to do it.  As an additional optimization I usually
> pass that COUNT() result along as hidden field like "rows" so that I don't
> have to run two queries for every page.  Basically you just put the
> data-fetching SELECT inside your callback and use the offset and length
> parameters to seed a LIMIT.
>
> > If so,  could someone provide an example?
>
> Hmmm, let me get back to you on that.  I know I've got one around here
> somewhere...
>
> -sam
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to