I would recommend storing the produce options in a separate table.  IE..

Ie, a "productOptions" table containing product_id, option_id, and 
option description.  You then have to also store the option_id in the 
shopping cart.

Your way is a violation of database normalization rules :)


Jeff F wrote:
> I've got a table with products. Each product has a unique id. And, the 
> product has are different sizes and each size is a new product id. 
> 
> example: "redcar" "large" has a unique id.
>          "redcar"  "medium" as a inique id. 
> 
> Now, I can't seem query & display the products on a page so the product shows 
> once, with a select options form box for the size. I'd like the product name 
> to show once, then a select box to display the size options.   
> 
> If I use this it look ok, but I'm not unable to pass the productID through 
> the form:
> <cfoutput query="getproducts" group="productname" groupcasesensitive="no">
>       <span class="product">#productname#</span><br />
>    <i>#description#</i>
>          <select name="option1" class="formbox">
>             <cfoutput>
>             <option value="#option2#">#option2#</option>
>              </cfoutput>
>          </select>
> 
> </cfoutput>
> 
> Is there a better way to display? Since I'm keeping track of the items 
> ordered using the productID, I'm now thinking that if I use the above, I'll 
> next need to query the table for an id where the productname and option2 
> match to get the productID. 
> 
> Or, would there be a better way to display the item with size selection so 
> the id gets passed? 
> 
> -jeff
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257664
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to