[Zope] sum() produces floats not integers
Wayne Connolly
wayne_connolly at yahoo.com
Mon Sep 15 00:50:59 EDT 2003
Hi ya all,
When I sum a column decimals(floats) are returned. ie.
2.0, 3.0. but i only want the integer instead of the
trailing ".0"
I cant seem to work out how to do this however i
assume its controlled by the sum() function. Can
anyone help me on this?
Below is the code fragments which currently work but
with the ".0"
Zsql
SELECT title, SUM(plays) AS plays FROM charts GROUP BY
title
PageTemplate
<TR bgcolor="#333333" tal:repeat="charts
here/getChartsMethod">
<span TAL:replace="charts/title">Title</span>
<span TAL:replace="charts/plays">Plays</span> </TR>
Cheers,
wayne
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
More information about the Zope
mailing list