From: Paul Halliday on 8 Jun 2010 10:37 I just spent the last 1/2 hour looking at many different solutions for this. Is there a universal favorite? Thanks.
From: Ashley Sheridan on 8 Jun 2010 10:41 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
From: "Sharl.Jimh.Tsin" on 9 Jun 2010 04:44 yes,LIMIT for mysql is useful. Best regards, Sharl.Jimh.Tsin 2010/6/8 Ashley Sheridan <ash(a)ashleysheridan.co.uk>: > 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 > > >
|
Pages: 1 Prev: array key's: which is correct? Next: finding the web root |