Re: paging large amounts of data
| From: | Justin Patrin | Date: | Tue, 23 Aug 2005 17:09:53 +0000 |
| Subject: | Re: paging large amounts of data | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20551@lists.php.net to get a copy of this message | ||
On 8/23/05, Lukas Smith <lsmith@php.net> wrote:
> Justin Patrin wrote:
>
> > Again, I point you to the SDG code. IMHO it does this very well,
> > passing the limit/offset back from the pager into the data source.
> > When using SDG with DB_DataObject for instance only the records
> > required are queried. The only query prior to that is a count(*).
>
> sorry .. could you point me to where its "passing the limit/offset back
> from the pager"? i dont see it :-(
>
Hmmm...well, actually this info isn't pulled from the pager at all.
The currentPage and perPage are member vars of the DG. Pager is used
only for the links. The actual offset calculation is done in
Renderer.php fetchDataSource(). ($page*$this->rowLimit)
--
Justin Patrin