Displaying 1 result from an estimated 1 matches for "totalvalu".
Did you mean:
totalvalue
2006 Jun 03
6
Calculating row COUNTs
...en add those values up. Next find the same rows with the
value = -1 and add those values up also. Finally, I would like to find
the total. Therefore, if there were 5 rows with value = 1, this would
be 5 and 3 rows with value = -1, this would be -3. Then when I add them
together, it would be totalvalue = 2.
Would somebody be able to help me with this? Or is there a better way to
do this? I''m not exactly sure where and how to setup this (do I do this
in the model or controller?).
Thanks!
--
Posted via http://www.ruby-forum.com/.