Well, I'll be ... I got it...!!!  Here is my result query

select g.group_name, i.itemid, p.sku, p.title
        from
        sd_kit_groups g
        INNER JOIN sd_kit_items i
                ON g.id = i.groupid
        INNER JOIN sd_products p
                ON i.itemid = p.id
        WHERE g.productid = '#url.id#'
group by g.group_name, i.itemid, p.sku, p.title

Thank you if you were looking at it .. !!

Paul Giesenhagen
QuillDesign


----- Original Message -----
From: "Paul Giesenhagen" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, May 10, 2002 10:30 PM
Subject: Big Join -- OOPs


> (Sorry didn't change subject on first message)
>
> I have another join question ...  I am trying to get the following data:
>
> 1 PRODUCT is a KIT, the KIT consists of multiple GROUPS of PRODUCTS
>
> So, a Fishing Rod, Reel and Line combo  would look like this:
>
> Fishing Rod Reel and Line Combo (main product)
>
> Choose a rod (group_name)
>     Rod A (itemid - product)
>     Rod B (itemid - product)
>
> Choose A Reel (group_name)
>     Reel A (itemid - product)
>     Reel B (itemid - product)
>     Reel C (itemid - product)
>
> Choose Fishing Line (group_name)
>     Line A (itemid - product)
>     Line B (itemid - product)
>
> My tables are such:
>
> PRODUCT Table (which holds the main product (the combo) and the kit
products
> as well
> id, title, sku ...
>
> KIT GROUP Table (which holds the Choose a Rod, Choose a Reel ... groups)
> id, group_name, productid (Main product)
>
> KIT GROUP ITEMS table (which is all the items for each group)
> id, groupid, itemid (which is a product id)
>
> Whew ... any of you joiners out there?
>
> Thanks
>
> Paul Giesenhagen
>
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to