2 Sep
1999
2 Sep
'99
12:02 a.m.
Rick Ree wrote I have a MySQL query as follows:
select foo.id, bar.name, count(*) from foo, bar where (foo.id = bar.id) group by foo.id
Error, exceptions.KeyError: unhandled
Why might this be? If I omit count(*) from the query it runs fine, or if I use count(*) in a query involving only a single table, it also works.
try this: select foo.id, bar.name, count(*) as cnt from foo, bar where (foo.id = bar.id) group by foo.id The returned columns from an SQL query have to be named something that Zope can deal with (and have to be uniquely named). Anthony