[Zope] formatting problem...

Luciano Ramalho luciano@hiper.com.br
Thu, 15 Mar 2001 13:13:03 -0300


Hello, Daniel!

Instead of just reformatting the data, you should convert it from a long
integer to a plain integer as soon as you get it from the query. Then
you'll be able to handle it more easily. This would be a quick fix.

A better long term solution would be to investigate why you are gettin
long integers from MySQL in the first place, and fix the cause instead
of the symptom.

If you need any additional help, don't hesitate to contact us.

Best regards,

Luciano

Daniel Corr=EAa de Azevedo wrote:
>=20
>     Hello you all.
>     I=B4m having problem in using FMT atribute of the DTML-VAR tag in d=
tml
> methods. The situation is that when I receive some integer data from a =
MYSQL
> database, I get it with a L sufix. That makes it necessary to format th=
e
> data with <dtml-var key fmt=3D"%d">. Now, the problem is that, sometime=
s, I
> need to keep on passing the data over to a few dtml methods, and when e=
ver I
> need to reformat the data, I get an erro message: " Ilegal argument typ=
e for
> built-in operation.".
>    I need to reformat because the data in the other dtml-methods in the
> sequece may be being received from the MYSQL database.
>    How coud I reformat the data using <dtml-var key FMT=3D"????">, even=
 if it
> has already been formated by <dtml-var key fmt=3D"%d">?
>=20
>    Thanks,
>                                                         Daniel C. Azeve=
do
>=20
> _______________________________________________
> 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 )