Re: DB Pager maxpages algorithm and lastpagefrom variable
| From: | Pierre-Alain Joye | Date: | Wed, 24 Jul 2002 14:47:32 +0000 |
| Subject: | Re: DB Pager maxpages algorithm and lastpagefrom variable | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7944@lists.php.net to get a copy of this message | ||
On Wed, 24 Jul 2002 15:30:31 +0100
Richard Wall <richard@cwndesign.co.uk> wrote:
> On 24/07/2002 13:24, Tomas V.V.Cox wrote:
> I prefer it this way *but* can't say I've tested it very thoroughly.
> Certainly I'd like to see the lastpagefrom included in DB_Pager. There's
> [lastpage], but that just seems to hold the total number of pages.
Or just change the algo ?
> Wondered if it might be a faster alternative to running a duplicate
> count(*) select query to get the num_rows. Also I wonder if it could
> somehow be done automatically by the limitQuery() method of PEAR::DB. Just
> a thought.
Sure, keeping in mind DBPager can be used with others kind of data (in fact, whatever you want ;) ).
Note you can make it just once per view session.
http://www.pearfr.org/ for short samples.
pa