[Zope] Re: totalling variables

Mehmet Yousouf mehmety@carramar.auslin.com.au
Thu, 03 Apr 2003 19:36:02 +0000


My eternal gratitude Maik


Regards, Mehmet

Maik Jablonski (maik.jablonski@uni-bielefeld.de) wrote:
>
>mehmety wrote:
>> Hello, this should be a simple one but.....
>> I've got a setup like
>> <dtml-in some-sql-query>
>>    <dtml-in some-other-sql-query-that-uses-an-argument-from-first>
>>    </dtml-in>
>> </dtml-in>
>> the second dtml-in gets a total of some products relating to the first
>> dtml-in. I want to total up
>> all the iterations
>
>Hi,
>
>I would do it this way...
>
><dtml-call "REQUEST.set('total_balance',0)">
><dtml-in some-sql-query>
>    <dtml-in some-other-sql-query-that-uses-an-argument-from-first>
>    <dtml-call "REQUEST.set('total_balance',total_balance+balance)">
>    </dtml-in>
></dtml-in>
>
>Cheers, Maik