[Zope] SQL Queries and Key Errors

Jordan B. Baker jbb@spyderlab.com
Tue, 20 Apr 1999 12:54:24 -0400 (EDT)


On Tue, 20 Apr 1999, Shaw, Howard wrote:

> This same query works perfectly under myadmin2.0 against the same
> database. Any ideas why it fails here? I thought it might be because
> 'valid' was a reserved word, but I seriously doubt that 'vald' is.
> 
> Error, exceptions.KeyError: unhandled 
> 
> SQL used:
> 
> SELECT (PASSWORD('testing')=password) as vald
> FROM researchers
> WHERE uid='test'

This seems to be a bug somewhere in either the MySQL driver of the Zope
glue.  Try CONCAT(password-crap) to cast the result to a string
automatically. 

Hopefully this will help you. :)

-------
Jordan B. Baker -- jbb@spyderlab.com
weaving the web @ http://www.spyderlab.com