Am 30.08.2007, 09:08 Uhr, schrieb Lukas Zapletal <[EMAIL PROTECTED]>:

I have a problem with "total-*" variables when suming results from
MySQL 5.x. It does not work with monetary (float) numbers - only with
integers. When trying to sum floats it cointanins nulls. IMHO the
reason is in a driver because it probably do not convert numbers in
national currency format (some countries, e.g. mine, do not use dot as
separator). The problem is that the driver is outdated and old.

Is there a fixaround? How could I for example convert the numbers
explicitely? Or how do I ovverride the behaviour of the code that is
responsible for the sumarizing?

I'm not familiar with this part of MySQL but if a conversion is required then you will probably need to access Python's locale functions in which case you can't use ZSQL that easily. I don't reckon the driver is broken but you're better off asking the question on the Mysqldb list.

Charlie Clark

Professional Python Services directly from the Source
Python/Zope Consulting and Support ...
mxODBC.Zope.Database.Adapter ...   
mxODBC, mxDateTime, mxTextTools ...

:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
Zope-DB mailing list

Reply via email to