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 e.g. table looks: ------ first query------------------- -------second------ product description quantity balance I want to get a total of the balance using dtml. (I could add another field onto the database and use sequence-end and total-balance but it should be easily done with dtml.) As usual, any help greatly appreciated Regards, Mehmet
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
participants (2)
-
Maik Jablonski -
mehmety