RE: [Zope] SQL-Query works with MySQL-monitor but not with ZMySQL DA
29 May
2000
29 May
'00
11:45 a.m.
-----Original Message----- From: Andy Pahne [mailto:ap@net22.net] Sent: 29 May 2000 13:03 To: zope@zope.org Subject: [Zope] SQL-Query works with MySQL-monitor but not with ZMySQLDA
Hi, there,
if I use my mysq-monitor to execute the following query, everything works fine:
SELECT YEAR(START_DATE) FROM EVENT;
but it doesn't work via the ZMySQLDA!?!
Here's the traceback:
Error, exceptions.KeyError: unhandled
[...] IIRC, this problem (which occurs when the results of functions, instead of columns, are returned) was mentioned some time back. You should be able to resolve it by aliasing the result: select YEAR(START_DATE) as START_DATE_YEAR from EVENT You can then refer to START_DATE_YEAR in your DTML. hth, -- Marcus
9443
Age (days ago)
9443
Last active (days ago)
0 comments
1 participants
participants (1)
-
Marcus Collins