Jump to content

Alphabetic List of SQL results with each letter in a group


thomjjames

Recommended Posts

Hi everyone,

 

i was wondering if anyone out there knows how to list mySQL results in alphabetical order with each letter having its own group [probably doesn't make much sense, so...].

 

So for example it would look like this:

 

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]

A

All the people whos name begins with A.

 

B

All the people whos name begins with B.

 

C

All the people whos name begins with C

 

and so on and so on.

The only way i know how to do this would be to make separate recordsets for each letter of the alphabet [abit long winded] and i was hoping someone might know how to do this with a for loop or something similar.

 

 

any suggestions would be brilliant

 

 

Thanks

TOM

Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.