Skip navigation
Currently Being Moderated

Multiple outputs

Dec 12, 2011 11:08 AM

I made this webpage that will display products and where they are located. I am trying to set it up to allow the user to only show the products in their area. I am using a jump menu to display from the query all the provinces they are in, but the cfoutput is displaying ALL the locations even though they are duplicates. is there a way to prevent the return from doing so.

 

For example:

78 Chevy, Toronto ON

2003 Toyota, Toronto ON

65 ford, Toronto ON.

 

Now on the jump menu (or if you know a better method) i only want it to display "ON" once, instead it's returning ON 3 times in the drop down menu. Is there a way to prevent that?

 

Thanks

 
Replies
  • Currently Being Moderated
    Dec 12, 2011 12:40 PM   in reply to K0rrupt

    How are you storing your data?  Is "their area" a separate field in one of your database tables?

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 12, 2011 2:33 PM   in reply to K0rrupt

    How about

     

    select distinct province
    from SaleItems

    order by province

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points