Re: Grouping

From: Date: Thu, 19 Jan 2006 18:28:55 +0000
Subject: Re: Grouping
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-228847@lists.php.net to get a copy of this message
Jeffrey Pearson wrote:
OK. I know I did this a LONG time ago but I don't remember how I did it. Thus, my post. I have a list of last names from a MySQL database. I need to display them grouped by the first letter of their last names and insert a separator on display. Similar to a phone book. So it looks like; A ___ Adams Apple Army B __ Banjo Bank Bark C __ Captain Car Is there a way without jumping through too many hoops? Thanks for any input you can give.
Order them with your query select * from db.table order by table.lastname ASC -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 jnichel@dotcomholdingsofbuffalo.com

« previous php.general (#228847) next »