I have a question about finding the sum of a specific field across the
results of an entire query

While this statement will return the total number (len) of records
returned in a query:
pledgedrive_total_pledges = len(db
(db.pledge.pledgedrive==pledgedrive_id).select())

I would like to get the total dollars (sum) of the "amount" field that
each of these records contains.

Thank you for your help.

JT

P.S. As an extra bonus, I am most pleased to discover the jquery ajax/
load script.  I may be saying goodbye to framesets for good:

http://code.google.com/p/pledgedrivetracker/source/browse/pledgedrives/views/default/report_mini_pledgedrive_goal.html?r=7a806e6a8ea0151f9c0977eb7599365f9ca9d48a

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to