[Zope] dtml-sqltest

Montagne, Michael montagne@BOORA.com
Fri, 28 Sep 2001 16:14:35 -0700


The following string in a ZSQL method will not include any where clause.
What is wrong?  The MktSectorID field occurs in both tables so I need to
specify it with the dot notation.  Could that be it?  If I remove the
optional, I get the same result.  


SELECT tblProjData.projnumb, tblProjData.projname,
tblProjPhase.ProjIsActive, tblProjMktSector.projtype,
tblProjData.MktSectorID FROM (tblProjData INNER JOIN tblProjMktSector ON
tblProjData.MktSectorId = tblProjMktSector.MktSectorID) INNER JOIN
tblProjPhase ON tblProjData.ProjPhaseID = tblProjPhase.StatusID
<dtml-sqlgroup where>
<dtml-sqltest tblProjData.MktSectorID type="int" op="eq" optional>
</dtml-sqlgroup>
ORDER BY tblProjData.projnumb;