It would have to be out of the range of a 4-byte integer, which is not likely in most applications. MySQLDA sees MySQL INT and INTEGER (4 byte) type fields as longint types, which are also 4 byte integers (which is -2,147,483,248 to 2,147,483,248). I am not sure about MySQL's BIGINT type, which is an 8-byte integer, which is so rediculously big (2^64 or 18,446,744,073,709,551,616 possible numbers), it's hard to imagine anyone using. I'm not sure how Python's __int__() handles an 8-byte value, I cannot seem to find an answer in the Python Reference Manual... Sean -----Original Message----- From: Steve Drees [mailto:drees@the-bridge.net] Sent: Friday, May 11, 2001 11:21 AM To: sean.upton@uniontrib.com; Zope@Zope. Org Subject: RE: [Zope] problem selecting integers from mysql
put int() around your results; it will convert a longint to an integer.
What happens if the longint is too big for an int?