I am having a similar problem. I am using Dreamweaver (MySQL, PHP) and their advanced recordset to select the tables and fields. The recordsets are pulling all the pertinent records. However, when a shirt is in two colors and available in 10 sizes, each color repeats 10 times for each size in the dynamic color drop down list, and the 10 sizes are repeated twice for each color in the size drop down list.
This is from the DETAIL page recordset:[code=sql]
SELECT products.itemID , size.size, color.color, options.option
FROM products
JOIN size
JOIN linksize
JOIN color
JOIN linkcolor
JOIN options
JOIN linkoptions
ON products.itemID =linksize.itemI D AND size.ID=linksiz e.sizeID
AND products.itemID =linkcolor.item ID AND color.ID=linkco lor.colorID AND products.itemID =linkoptions.it emID AND options.ID=link options.optionI D
WHERE products.itemID =colname [/code]I originally linked all the tables with the WHERE command because the styleno was a foreign field in every table. MySQL book told me to do it like this, so I did, but it has the same result.
What can I add to this script to only show the sizes (xsm-6xl) one time instead of multiplying for each color.
I can e-mail you the print screens in a Word doc to help you see what I am talking about. The web page is not published yet so I can't give you the link.
Evie
Please enclose any code within the proper code tags. See the Posting Guidelines on how to do that. - moderator
This is from the DETAIL page recordset:[code=sql]
SELECT products.itemID , size.size, color.color, options.option
FROM products
JOIN size
JOIN linksize
JOIN color
JOIN linkcolor
JOIN options
JOIN linkoptions
ON products.itemID =linksize.itemI D AND size.ID=linksiz e.sizeID
AND products.itemID =linkcolor.item ID AND color.ID=linkco lor.colorID AND products.itemID =linkoptions.it emID AND options.ID=link options.optionI D
WHERE products.itemID =colname [/code]I originally linked all the tables with the WHERE command because the styleno was a foreign field in every table. MySQL book told me to do it like this, so I did, but it has the same result.
What can I add to this script to only show the sizes (xsm-6xl) one time instead of multiplying for each color.
I can e-mail you the print screens in a Word doc to help you see what I am talking about. The web page is not published yet so I can't give you the link.
Evie
Please enclose any code within the proper code tags. See the Posting Guidelines on how to do that. - moderator
Comment