I have to point out that this approach is terribly inefficient. Calculations like this should be in at the database level using SQL, that's exactly what it's supposed to do. Any time you're looping over queries to run more queries, or to total things up, it should be a big red flag, because in almost every situation the same thing can be done in SQL more easily and far more quickly.
On Fri, Apr 18, 2008 at 3:36 PM, erik tom <[EMAIL PROTECTED]> wrote: > IN my code I output the query into the table. The is a column that > contains time . SAo what i need to do is to get an average to this coumn . > > <tr> > <cfset count=0> > <td > valign="top">#RTrim(Lname)#, #Trim(FName)#<cfif Trim(MName) is not ""> > #Trim(MName)#</cfif> <cfif DateCompare(ExpDate, now() , "d") lt > 1><br>[<i>Expired</i>]<cfelseif Active is not 'Y'><br>[<i>Not > Active</i>]</cfif></td> > <td > valign="top">#TRIM(employeeID)#</td> > <td > valign="top">#TRIM(location)#</td> > <td > valign="top">#OpUnit#</td> > <td > valign="top">#TRIM(email_address)#</td> > <td > valign="top">#DeptID#-#DeptName#</td> > > <!--- write > our completion dates ---> > <cfloop > from="1" to="#arraylen(arrTopics)#" index="j"> > > <td valign="top">#arrComplete[j]#</td> > </cfloop> > <td > valign="top">#FirstLoginDate#</td> > <td valign="top">#LastLoginDate#</td> > > <cfset ttl= 0> > <!---this is the column---> > <td valign="top"><cfif > qryTimesOnline.recordcount eq 0> <cfelse> > #qryTimesOnline.Hours#h:#qryTimesOnline.Minutes#m > <cfset > ttl=#qryTimesOnline.Hours#+ttl></cfif></td> > > <td valign="top"><cfif > qryTimesOnline2.recordcount eq 0> <cfelse> > #qryTimesOnline2.Hours#h:#qryTimesOnline2.Minutes#m</cfif></td> > <td valign="top">#qryTime.cardName#</td> > <cfset count=count+1> > </tr> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303788 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

