> Why? It will almost certainly be a much better solution than  
> anything else
> you're considering.

Dave - Not sure it's better than 'anything else.' Why stick with a  
query that'd need constant grouping when what he's got in the DB is a  
set representing a hierarchical data structure?

Instead of returning a query that'd need grouping each time you use  
it, you could build up a struct once (by grouping) and then logically  
navigate / manipulate it on an ad-hoc basis:

<!--- getOrder() calls sproc and builds up structure --->
<cfset order = myCfc.getOrder(orderId) />

<!--- order's date created --->
<cfoutput>#order.dateCreated#<br /></cfoutput>

<!--- gift certificates in the order --->
<cfoutput>
        <cfloop array="#order.giftCertificates#" index="cert">
                #order.giftCertificate.amount#<br />
        </cfloop>
</cfoutput>

<!--- how many status comments? --->
<cfoutput>#arrayLen(order.statusComments)#</cfoutput>

-Joe


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

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

Reply via email to