RE: [PHP] Displaying in Alphabetical Order
| From: | Philip Olson | Date: | Sun, 15 Oct 2000 06:44:31 +0000 |
| Subject: | RE: [PHP] Displaying in Alphabetical Order | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-20221@lists.php.net to get a copy of this message | ||
> > I have a MySQL database which holds users registered info,
> > one of the fields is their surname, does anyone know the PHP code
> > that would let me display all the users 20 per page in alphabetical
> > order according to their surname with the little numbers for moving
> > between pages faster?
>
> Add "ORDER BY surname" to your SQL statement.
> Jason
Also, there are tutorials on prev/next buttons listed here :
http://www.faqts.com/knowledge-base/view.phtml/aid/5871/fid/51
Which explains limiting results to set amounts, such as '20'. iirc,
these explain numbers too (1 2 3 4 -->). If you need more help on
those, search mailing lists for words such as 'prev next' 'prev/next'
perhaps 'sql limit' and similar words.
Warm regards,
Philip