[Zope] Zope + MySQL problem

Paul Zwarts paz@oratrix.com
Thu, 8 Nov 2001 00:01:55 +0100


Chris,

Someone will likely tell you the answer why its returning a value as a
long integer (which is what it is). I had the same problem long ago. But
I've been piping the results through int for so long that I've forgotten
the problem.

<a href="collect_stats.html?record_id=<dtml-var "_.int(record_id)">">

Cheers,
Paz

Try rebuilding your database? When we went from irix6,5 to linux rh7.2
we had the same result. Come to think of it, I don't know why it doesn't
occur anymore. 

-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org] On Behalf Of
Chris Gray
Sent: Wednesday, November 07, 2001 10:31 PM
To: zope@zope.org
Subject: [Zope] Zope + MySQL problem


I have a working Zope site that I want to move to a more powerful
machine.  
I've set up the new machine (Debian GNU/Linux).  I've moved Data.fs and
everything looks fine.  I've dumped the mysql database and reloaded it
and
everything looks fine

 ... 

except a query to the MySQL database that retrieves an integer record id
value now retrieves it with the suffixed 'L' for a python long
integer.  This 'L' goes into a URL and breaks the next step in the
process
since Zope gives an error that '1727L' (or whatever) is not a proper
integer.

The code is basically the following inside a dtml-in loop on a database
query:
     <a href="collect_stats.html?record_id=&dtml-record_id;">
This used to render as:
     <a href="collect_stats.html?record_id=1727">
and now renders as:
     <a href="collect_stats.html?record_id=1727L">

Why?

Thanks,
Chris


_______________________________________________
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 )