On Tue, 2010-06-08 at 11:37 -0300, Paul Halliday wrote:

> I just spent the last 1/2 hour looking at many different solutions for
> this. Is there a universal favorite?
> 
> Thanks.
> 


It depends what you mean by pagination, as there are two parts to it.
There is the display of the pagination nav and then the retrieval of
paginated results:

Use LIMIT in the SQL to paginate the data retrieved. I usually just use
a few variables to determine the pagination display; $current_page,
$items_per_page, $total_pages (which can be got by issuing a COUNT() in
the SQL for all possible records that match.

Thanks,
Ash
http://www.ashleysheridan.co.uk


Reply via email to