Forum Moderators: open

Message Too Old, No Replies

Dynamic dropdown list drawn from a database

how to display field value only once

         

le_gber

10:29 am on Jun 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

I've got a bit of a pb and would appreciate any feedback from ASP gurus.

Let's say I have widgets - blue, red, and yellow.
These widgets are sorted by categories Big Small and medium.
Every piece of info is drawn from a database.

in my dtb I have
widgetA blue medium
widgetB red medium
widgetC yellow medium
widgetD blue medium

What I want to do is display next to each category a drop down but only display the color once even if many products are blue.

I tought of having a if statement saying that

if the current value has already been display in the drop down then
don't show it and move to the next data from the dtb
end if

But I don't seem to figure out how to tell the asp to check the other value displayed.

Thanks for the help

Leo

topr8

10:51 am on Jun 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



i think you need to create a recordset (to populate the drop down) using GROUP BY color

richardb

10:56 am on Jun 17, 2003 (gmt 0)

10+ Year Member



Alternatively, if the cats are in a seperate table. Use that and filter the results from the main table via queries, stored procedures.

Rich