The trailing L identifies a long int in Python.  As of ZMySQLDA 2.0.4, MySQL
integers use Python longs because an unsigned MySQL integer could overflow a
Python int.  So, it's a bug fix.

A couple solutions (found at
are to use <dtml-var num fmt="%d"> or something similar to strip the L, or
use Python 2.x, which would not display the L in this case.  You could also
modify MySQLDA to use a Python int if you know you're not going to have
integers that will overflow.

Note that Python 2 is not officially supported by Digital Creations, though
it does happen to work with Zope 2.3.0.

Ron Bickers
Logic Etc, Inc.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jens
Sent: Saturday, January 27, 2001 11:36 PM
To: Zope Maillist
Subject: [Zope] MYSQL Problem

>From the following SQL statment I get the result  233L and not 233 as

select count(PID)
from product

When I run this SQL Statment from another program I get the expected value

In my installation there are a lot of Z SQL Methods that should return an
int value and when I use field description int in the database I always get
this 'L' behind the expected result. A lot of things don´t work because of

When I change to mediumint (database field description) I get the expected

How can I fix this.

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to