Using templates I can calculate this:
<%loop results%>
<%set total_count += $field1%>
<%endloop%>
and then display total like this:
Total: <%total_count%>
Above works fine. Now I want to go little more advanced:
<%loop results%>
<%set total_count += $field1 * $field2%>
<%endloop%>
ie calculate by multiplying (field1 * field2) and then add them to 'total_count', until loop is finished.
now when displaying <%total_count%> there is nothing???
Why? and how do I correct this?
Thanks
<%loop results%>
<%set total_count += $field1%>
<%endloop%>
and then display total like this:
Total: <%total_count%>

Above works fine. Now I want to go little more advanced:
<%loop results%>
<%set total_count += $field1 * $field2%>
<%endloop%>
ie calculate by multiplying (field1 * field2) and then add them to 'total_count', until loop is finished.
now when displaying <%total_count%> there is nothing???
Why? and how do I correct this?

Thanks