House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / ColdFusion Talk (CF-Talk)

Cool feature I didn't know about

Author:
Peterson, Chris
07/25/2006 02:34 PM

Most of you probably know this, but I thought I would share because I will use this all the time. How often do you need to output a total line at the bottom of a report? You probably do one of 2 things:  1) Increment a variable while outputting your query, or b) perform a query of queries. I found this trolling online and needed to share, lets say you have a query called 'getData' and a column named 'rev' and you needed a total. Just do this:   #arraySum(getData['rev'])#  You can use any array functions (avg, max, min) against a query column referenced like this. This seems a lot easier to read to me too! Chris Peterson


Search cf-talk

March 20, 2010

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31