Re: bug in DB_Pager
| From: | Pierre-Alain Joye | Date: | Tue, 03 Jun 2003 20:55:25 +0000 |
| Subject: | Re: bug in DB_Pager | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-16970@lists.php.net to get a copy of this message | ||
On Tue, 03 Jun 2003 22:44:23 +0200
Demian Turner <demian@muse23.com> wrote:
> > This is not a bug.
> > This is the "google" algorithm, see google to see how it works. This
> > is an optionnal feature.
> >
> > pierre
>
> Hi Pierre
>
> Using DB_Pager as follows:
>
> $limit = 10;
> $totalNumRows = 138;
>
> $data = DB_Pager::getData($input->from, $limit, $totalNumRows, 10);
>
> I got the following results:
>
> >> 1 << 2 3 4 5
>
> 1 >> 2 << 3 4 5 6
>
> 1 2 >> 3 << 4 5 6 7
>
> 1 2 3 >> 4 << 5 6 7 8
>
> and so on ...
>
> I see what you mean, I hadn't noticed beforehand that Google does this
>
> as well. Seems quirky, I'd be curious to know how to disable the
> 'feature' and get just 10 links throughout the resultset.
This is a feature and a nice one :).
Well, you got all pages or the google version. Not that hard to take
only 10 pages from the 'pages' array. Maybe provides this feature should
be usefull to save 2 lines in the code ;)
hth
pierre