> -----Original Message-----
> From: Andy Pahne [mailto:[EMAIL PROTECTED]]
> Sent: 29 May 2000 13:03
> To: [EMAIL PROTECTED]
> 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

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
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 )

Reply via email to