Re: Message Board Question
| From: | W. Enserink | Date: | Tue, 11 Mar 2003 10:50:42 +0000 |
| Subject: | Re: Message Board Question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-139114@lists.php.net to get a copy of this message | ||
maybe use mysql to retrieve only 5 records.
$query="select * from table limit [1,5]"; //search in the mysql manual to be
sure!
this limit thing you can make variable
$limit_thing_max=5;
$limit_thing_min=$pagenumber*$limit_thing_max;
$query = "select * from table limit [$limit_thing_min,$limit_thing_max]";
on the page numbers and previous and next button you assign a variable on
the url like .... <a href=http://pageurl.php?pagenumber=3>page 3</a>
it's just 1 idea of many I suppose. be sure to catch all boundary
conditions.
Wilbert
----- Original Message -----
From: "conbud" <conbudd@yahoo.com>
To: <php-general@lists.php.net>
Sent: Tuesday, March 11, 2003 11:31 AM
Subject: [PHP] Message Board Question
> Hi, this is kind of a complex question, Im making a message board, now I
> dont want list, lets say, all 25 messages on the same page. I would like
> to have <- previous 1 2 3 next -> type of links and only list 5 messages
> per page and every time a user clicks the next, previous, or one of the
> page number links it will list the next 5 messages that havn't been
> listed yet. Could someone show me how to do this or at least point me in
> the correct direction ? The data is all stored in a MySQL database.
>
> Thanks,
>
> --
> Conbud <conbudd@yahoo.com>
> Graphic & Web Design Using Open Source Technology
> --
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
-------------------------
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
info@pdd.nl
-------------------------