Phil, Yes, you are right. What really prompted my question was suddenly realizing that I hadn't ever tried to do any math with Zope and couldn't figure out how to add these columns. Let's say I'm not using a SQL query and I want to count the number of objects of certain types in a folder, present the individual totals, then add them into a combined total of all objects. Or let's say I'm running several SQL queries, perhaps against different databases (Oracle, MySQL, etc.) and I'd like to total the results of those. I could use some links to basic math with Zope I guess. Cheers, Mark Phil Harris wrote:
Why not just split your query up, one that returns the rows and another that returns the totals.
Use SQL for what it's good at.
hth ----- Original Message ----- From: "Mark Langkau" <mark.langkau@pbmplus.com> To: <zope@zope.org> Sent: Saturday, July 21, 2001 12:26 AM Subject: [Zope] How to I get column totals?
Hi,
I have a SQL query that returns columns of numbers. I'd like to add these numbers together and display the total at the bottom of the page under each column. My question is, as I move through the returned rows how do I add the current value of a field to the sum of all previous values of a field?