Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Alphabetical Navigation List

Posted on 2001-09-17
1
Medium Priority
?
407 Views
Last Modified: 2010-05-18
I have a long list of items from a DB query and I want to create a navigation bar showing the alphabet with each letter highlighted if there are items begining with that letter. What is the simpliest way to compare my list to the alphabet for this purpose, or easier yet, can I design my query to return a list of all letters used. I know there must be a simple way to do this.
0
Comment
Question by:td234
1 Comment
 
LVL 4

Accepted Solution

by:
heddesheimer earned 150 total points
ID: 6488758
If you have a field "name" in your DB you can try this:

select LEFT(name, 1) as sort_char from table group by sort_char

will just return one record for each Alphabet letter that is in your database

hope that helps

Marian
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question