Re: paging at which level
| From: | Robert Cummings | Date: | Sat, 18 Oct 2008 18:35:54 +0000 |
| Subject: | Re: paging at which level | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-282081@lists.php.net to get a copy of this message | ||
On Sat, 2008-10-18 at 12:54 +0200, Alain Roger wrote:
> Hi,
>
> i would like to know what is the best approach for paging ?
> usually i use PEAR and page thanks their table library, but to avoid high
> transfer of data from DB to PHP page it is better to do the paging at
> database level.
If you want top page data then you absolutely should NOT retrieve the
entire set of results (unless they are less than your paging length).
> I would like to know what is your point of view on this topic and what do
> you use to do ?
Use a paging system that takes a query or can build the query itself.
Most decent libraries or frameworks have something already built to do
so.
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP