Hi, I am trying to do a product details page for a clothing site. I am placing colours and sizes in two drop down list boxes. The problem i am having is that i get a lot of reapeating values as a result i.e for each colour there are a number of different sizes so i get
ddlcolours ddlsizes
navy x
navy s
navy m
black x
black s
etc etc. Can I make the ddls only show unique values or do I need to rethink my SQL statement?
Dim strSQL As String = "select distinct px.filename,p.description, c.description as colours,s.description as sizes from productsXcolours px " _
& "INNER JOIN products p ON px.productID = p.productID " _
& "INNER JOIN colours c on px.colourID = c.colourID " _
& "INNER JOIN productsxsizes pxs ON p.productID = pxs.productID " _
& "INNER JOIN sizes s ON pxs.sizeID = s.sizeID " _
& "where px.productID = " & (prodID) & " ;"
thank you for your time.
ddlcolours ddlsizes
navy x
navy s
navy m
black x
black s
etc etc. Can I make the ddls only show unique values or do I need to rethink my SQL statement?
Dim strSQL As String = "select distinct px.filename,p.description, c.description as colours,s.description as sizes from productsXcolours px " _
& "INNER JOIN products p ON px.productID = p.productID " _
& "INNER JOIN colours c on px.colourID = c.colourID " _
& "INNER JOIN productsxsizes pxs ON p.productID = pxs.productID " _
& "INNER JOIN sizes s ON pxs.sizeID = s.sizeID " _
& "where px.productID = " & (prodID) & " ;"
thank you for your time.