URGENT RE: [Zope] ZmysqlDA

Andy Dustman andy@dustman.net
29 May 2002 13:56:42 -0400


On Wed, 2002-05-29 at 13:45, Andy Dustman wrote:
> On Wed, 2002-05-29 at 13:38, Chris McDonough wrote:
> > This has nothing to do with Zope other than the fact that you're
> > carrying out a SQL query via a ZSQL method.  This error message comes
> > from MySQL.  Apparently there's a problem with your syntax.  Maybe MySQL
> > doesn't support this statement?
> 
> Actually, it does, or would, once he got past the duplicate column
> problem, since you can't return a column named id to Zope.

In fact, upon further consideration, the duplicate column error really
is a Zope/ZMySQLDA error and not a MySQL error. ZMySQLDA (and likely
many other DAs) will raise an exception if the same column appears twice
in the result set. It's not possible to know (without parsing SQL) that
the two columns are the same. The old ZMySQLDA (1.x series) would return
all column names as table.col; the new one (2.x series) does not.

-- 
Andy Dustman         PGP: 0x930B8AB6
    @       .net     http://dustman.net/andy
"Cogito, ergo sum." -- Rene Descartes
"I yam what I yam and that's all that I yam." -- Popeye