Where is your code now? Your code is probabaly not right. do something like
<cfset qSum=0> <cfoutput> <cfloop query="myQry"> #myQry.fieldName#<br> <cfset qSum=qSum+PriceField> </cfloop> #qSum#<br> </cfoutput> I would suggest you use an arrray to for the price field.. some like <cfscript> aPrz=arrayNew(1); aPrz=ListToArray(valueList(mQry.ItemPrice),","); </cfscript> <cfoutput> #arraySum(aPrz)# </cfoutput> The above is much cleaner. Joe On Thu, 31 Oct 2002 14:32:04 -0500 Mark Leder <[EMAIL PROTECTED]> wrote: > 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 tag only shows the > first > record. I want the tag to contain the sum of > all three ItemPrice > fields. What am I doing wrong? > > > > > > > > > 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 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.

