>Yikes! You can probably get all the stuff you need with one query, then use
>CFOUTPUT's GROUP attribute to group your output:
>
><CFQUERY NAME="mystuff" ...>
>       SELECT  c.category_name,
>                       s.subcategory_name,
>                       ss.subsubcategory_name,
>                       p.product_name
>       FROM            category c,
>                       subcategory s,
>                       subsubcategory ss,
>                       product p
>       WHERE           c.category_id = s.category_id
>       AND             s.subcategory_id = ss.subcategory_id
>       AND             ss.subcategory_id = p.subcategory_id
>       ORDER BY        c.category_name,
>                       s.subcategory_name,
>                       ss.subsubcategory_name
></CFQUERY>
>
>...
>
><CFOUTPUT QUERY="mystuff" GROUP="category_name">
><H1>#Category_Name#</H1>
>       <CFOUTPUT GROUP="Subcategory_Name">
>       <H2>#Subcategory_Name#</H2>
>               <CFOUTPUT GROUP="SubSubCategory_Name">
>               <H3>#SubSubCategory_Name#</H3>
>                       <CFOUTPUT>
>                       #Product_Name#<BR>
>                       </CFOUTPUT>
>               </CFOUTPUT>
>       </CFOUTPUT>
></CFOUTPUT>
>
>Note that when you use the GROUP attribute, you can nest CFOUTPUTs.
>

How would I do this if it is a standard parent/child table with the fields 
cat_id, catname, parent_cat_id, parent_catname? I think I now how the query 
would work but that is about it.

Thanks

Art


________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to