Thanks everyone for taking time to respond. All great ideas.  I got it
fixed.

Thanks,
Mark


-----Original Message-----
From: Shawn Kernes [mailto:skernes@;liquidseats.com] 
Sent: Thursday, October 31, 2002 2:44 PM
To: CF-Talk
Subject: RE: CFLoop query problem


Try this

<cfset SubTotalTaxable = 0>

<cfloop query="taxableOrderItems">
        <!--- notice there are no #'s in there --->
        <cfset SubTotalTaxable = SubTotalTaxable + OrderTotal +
ItemPrice> </cfloop>

-----Original Message-----
From: Mark Leder [mailto:mel@;markleder.com]
Sent: Thursday, October 31, 2002 11:32 AM
To: CF-Talk
Subject: CFLoop query problem


Hi All,
I'm trying to loop through a query to add all the items contained in
that query.

This query set contains three records.  When I do a CFOUTPUT inside the
CFLOOP on the ItemPrice field, all three individual prices are returned
in succession, but the <CFSET SubTotalTaxable> tag only shows the first
record.  I want the tag to contain the sum of all three ItemPrice
fields. What am I doing wrong?

<cfset SubTotalTaxable = 0>

<!--- Loop the taxable products --->
<CFLOOP QUERY="taxableOrderItems">
        <CFSET SubTotalTaxable = #OrderTotal# + #ItemPrice#>
</CFLOOP>

Thanks,
Mark



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to