[Zope] How to I get column totals?

Phil Harris phil.harris@zope.co.uk
Sat, 21 Jul 2001 00:38:11 +0100


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?
>
> I'm sure this is very easy - but my mind is fried from the work week and
> I'm just not thinking about this clearly. I've searched the lists and
> I can't put the right combination of search phrases together. I suspect
> this will be a python script solution rather than DTML.  Pointers to
> docs or how-tos I've overlooked would be helpful.
>
> Thanks!
> Mark
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )