howdy, you access the fields (columns) of the result set by whatever name the RDBMS returns. it looks like yours would return the value in a column named "sum". so i'd try <dtml-var sum> your second select statement looks like it has a missing 'AS' select sum(amount) as summa, name from log.... in this case you would access via: <dtml-var summa> 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 )
-- Tom Jenkins devIS - Development Infostructure http://www.devis.com