Z SQL Method returns diferent data in ID field
Yellow, I'm using a mysql database and Zope MySQL Database Adapter 1.1.4 I've build a Z SQL Method with the following select: bla bla Arguments: artigos.id artigos.autor artigos.email artigos.titulo artigos.topico artigos.dep artigos.sumario artigos.corpo artigos.attachment artigos.data artigos.data2 Query template: select * from artigos <dtml-sqlgroup where> <dtml-sqltest artigos.id type=int optional> <dtml-sqltest artigos.autor type=nb optional> <dtml-sqltest artigos.email type=nb optional> <dtml-sqltest artigos.titulo type=nb optional> <dtml-sqltest artigos.topico type=nb optional> <dtml-sqltest artigos.dep type=nb optional> <dtml-sqltest artigos.sumario type=nb optional> <dtml-sqltest artigos.corpo type=nb optional> <dtml-sqltest artigos.attachment type=float optional> <dtml-sqltest artigos.data type=nb optional> <dtml-sqltest artigos.data2 type=nb optional> </dtml-sqlgroup Everything works fine but i get an 'id' field with '1L' instead of '1' anyone had the same problem??? thanks --- Hugo Ramos - hramos@ruido-visual.pt Ruido Visual, Lda
On Mon, 3 Apr 2000, Hugo Ramos wrote:
Yellow,
I'm using a mysql database and Zope MySQL Database Adapter 1.1.4
I've build a Z SQL Method with the following select:
bla bla Arguments: artigos.id artigos.autor artigos.email artigos.titulo artigos.topico artigos.dep artigos.sumario artigos.corpo artigos.attachment artigos.data artigos.data2
Query template: select * from artigos <dtml-sqlgroup where> <dtml-sqltest artigos.id type=int optional> <dtml-sqltest artigos.autor type=nb optional> <dtml-sqltest artigos.email type=nb optional> <dtml-sqltest artigos.titulo type=nb optional> <dtml-sqltest artigos.topico type=nb optional> <dtml-sqltest artigos.dep type=nb optional> <dtml-sqltest artigos.sumario type=nb optional> <dtml-sqltest artigos.corpo type=nb optional> <dtml-sqltest artigos.attachment type=float optional> <dtml-sqltest artigos.data type=nb optional> <dtml-sqltest artigos.data2 type=nb optional> </dtml-sqlgroup
Everything works fine but i get an 'id' field with '1L' instead of '1'
anyone had the same problem???
Probably your id field is a MySQL INT UNSIGNED AUTO_INCREMENT? Actually, I'm a bit puzzled. Are you using the unpatched ZMySQLDA 1.1.4? The patch I have that updates ZMySQLDA 1.1.3 to use MySQLdb (instead of MySQLmodule) doesn't apply to 1.1.4 (so I hear), so I expect it is unpatched 1.1.4. If that's true, then perhaps that ZMySQLDA does not return the correct type for Python long integers. -- andy dustman | programmer/analyst | comstar.net, inc. telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d "Therefore, sweet knights, if you may doubt your strength or courage, come no further, for death awaits you all, with nasty, big, pointy teeth!"
participants (2)
-
Andy Dustman -
Hugo Ramos