Re: Pagination?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



yes,LIMIT for mysql is useful.

Best regards,
Sharl.Jimh.Tsin



2010/6/8 Ashley Sheridan <ash@xxxxxxxxxxxxxxxxxxxx>:
> 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
>
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux