Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database probelm

Status
Not open for further replies.

IWIT

Vendor
Mar 5, 2004
13
0
0
GB
I have a database that contains a series of entries that have a category. I want the category names to be displayed on a webpage so that I can make them into hyperlinks. There are several instances of the category names in the database but I only want each category name to appear on the web page once. But at the moment the categories are being displayed every time they appear in the database as below.


category 1
category 2
category 5
category 4
category 3
category 1


whereas I only want each category displayed once such as


category 1
category 2
category 5
category 4
category 3


What is the best possible way to do this in coldfusion?
 
Create a 'disitinct' query.
enter the catagories in a list and add to list if the new item is not already in the list, display list.
There are several options available, it depends on what you have available and the access to the data.

Erwin Oosterhoorn
Analyst Programmer,
ice hockey player/fan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top