Hi *, I have a dtml-in occurance, which returns several columns from a table, all of which are numeric values, but strings. Each is a different quantity of something, and I want to be able to display the total for each column. What I'm trying to get at is this... <dtml-in myZSQLMethod> <td> </td> <td><dtml-var qty1></td> <td><dtml-var qty2></td> <td><dtml-var qty3></td> <dtml-if sequence-end> <td>Total</td> <td>total for qty1</td> <td>total for qty2</td> <td>total for qty3</td> </dtml-if sequence-end> <dtml-in> My question is what logic do I use to calculate these totals? Cheers, Michael
<dtml-var total-qty1> Works well and is very simple. ----- Original Message ----- From: "Michael Fox" <Michael@CenturySoftware.com.au> To: <zope@zope.org> Sent: Monday, September 02, 2002 9:09 PM Subject: [Zope] dtml-in totals...
Hi *,
I have a dtml-in occurance, which returns several columns from a table, all of which are numeric values, but strings.
Each is a different quantity of something, and I want to be able to display the total for each column.
What I'm trying to get at is this...
<dtml-in myZSQLMethod>
<td> </td> <td><dtml-var qty1></td> <td><dtml-var qty2></td> <td><dtml-var qty3></td>
<dtml-if sequence-end>
<td>Total</td> <td>total for qty1</td> <td>total for qty2</td> <td>total for qty3</td>
</dtml-if sequence-end>
<dtml-in>
My question is what logic do I use to calculate these totals?
Cheers, Michael
_______________________________________________ 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 )
Michael Fox writes:
I have a dtml-in occurance, which returns several columns from a table, all of which are numeric values, but strings. ^^^ ^^^^^^^ ^^^ ^^^^^^^ What should that mean?
When they are numeric and +not* strings, you can use "total-XXXX" (which "XXXX" your variable) (as you already have been told). Dieter
participants (3)
-
Allen -
Dieter Maurer -
Michael Fox