[Zope] ZMySQLDA and aggregate functions on Win

Dave Woolston davew@digicool.com
Fri, 12 Jan 2001 16:45:16 -0500


This is curious to me - I tried this on my Linux platform from mysql and it
doesn't work.
Perhaps I misunderstand what you are trying to do:

SELECT COUNT(*) FROM mytable - returns a number - so I really don't expect
it to work.

I have a table - shop and a column in that table - article:

mysql> select count(*) from show group by article;
ERROR 1064: You have an error in your SQL syntax near 'show group by
article' at line 1

Sorry if I misunderstand what you are trying to do -

=================================
Dave Woolston   davew@digicool.com
Digital Creations  www.digicool.com
(716) 262-4715


> I have a problem with ZMySQLDA and aggregate functions in combination with
> grouping on Windows.
> When I say:
>   SELECT COUNT(*) FROM mytable GROUP BY myfield;
> I get an KeyError 'Unhandeld'.
>
>    SELECT COUNT(*) FROM mytable;
> works fine, so does
>   SELECT myfield FROM mytable GROUP BY myfield;
> but not the combination of both.
> Also on a linux machine the error doesn't occur. Of course I tested the
> queries from the mysql command line.
>
> Any help?
>
> Markus Kemmerling