Re: Pagination?

From: Date: Tue, 08 Jun 2010 14:41:23 +0000
Subject: Re: Pagination?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-305960@lists.php.net to get a copy of this message
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

« previous php.general (#305960) next »