Re: MySql
| From: | Ernest E Vogelsinger | Date: | Tue, 08 Apr 2003 11:22:19 +0000 |
| Subject: | Re: MySql | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142835@lists.php.net to get a copy of this message | ||
At 12:16 08.04.2003, Burhan Khalid said:
--------------------[snip]--------------------
>On Tue, 2003-04-08 at 04:33, José Pereira wrote:
>> How do I create a Next and Previous button for a list from the DB
>>
>> I have 169 records
>> want to limit to about 25 -30 per page and put a search how can implament
>> this??
--------------------[snip]--------------------
While RTFM might be a valid option here I assume Jose is a newbie with PHP
and web programming, so here are a few hints:
(1) You may consider partitioning your resultset so you can "page" through
it. This can be achieved in 2 possible ways:
- retrieve the complete resultset, and only display part of it (using array
indices)
- retrieve only a part of the resultset (using the LIMIT clause)
(2) Paging can be done using URL parameters, such as "start" and "count" so
that the script knows where to start displaying the result, and how many
lines to be displayed.
I believe you can figure the start out now.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/