try the following: SELECT SUM(AMOUNT) AS MY_SUM, NAME FROM LOG GROUP BY NAME <dtml-in SelectMethod> Name: <dtml-var NAME>, Summary of amount: <dtml-var MY_SUM> <dtml-in> i suspect using just SUM(AMOUNT) leaves the resulting value with some indeterminate name or no variable name at all. so you must explicitly give that variable a name. jens On Thursday, August 30, 2001, at 10:10 , Kerekes Lajos wrote:
Hi!
I have problem. Could you help me? I have a ZSQLMethod, it contains "SELECT SUM(AMOUNT), NAME FROM LOG GROUP BY NAME" How can I reach the SUM value in dtml?
<dtml-in SelectMethod> Name: <dtml-var NAME>, Summary of amount: <dtml-var ????> <dtml-in>
I tried the : "SELECT SUM(AMOUNT) SUMMA, NAME FROM LOG GROUP BY NAME"
<dtml-in SelectMethod> Name: <dtml-var NAME>, Summary of amount: <dtml-var SUMMA> <dtml-in>
but it gives Error Type: KeyError Error Value: SZUMMA
Thank you:
Lajos Kerekes
_______________________________________________ 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 )