----- Original Message -----From: acgTo: zope@zope.orgSent: Monday, August 27, 2001 2:28 PMSubject: [Zope] More Zope/PostGreSQL/PoPyDA.My personal configuration:ZPoPyDA 2.0.7Zope 2.4.0Python 2.1.1Debian/GNU LinuxAnother bug or is it only a bad dtml construction?Again from ZopeBook I see thisExamples
Sample usage:
select * from employees
<dtml-sqlgroup where>
<dtml-sqltest salary op=gt type=float optional>
<dtml-and>
<dtml-sqltest first op=eq type=string multiple optional>
<dtml-and>
<dtml-sqltest last op=eq type=string multiple optional>
</dtml-sqlgroup>
(...)
If
salary is 50000 and last is Smith it renders:select * from employees
where
(salary > 50000.0
and
last='Smith'
)
Mmmm..., is ZPoPyDA supposse to do that? I donīt think so. My code:
Arguments: id, name.
SELECT * FROM Departments
<dtml-sqlgroup where>
<dtml-sqltest id op=eq type=int optional>
<dtml-and>
<dtml-sqltest name op=eq type=string optional> IT WORKS!!! with the fix by Jim Penny
</dtml-sqlgroup>
ORDER BY idMy Query Result without blanks arguments, Zope renders...
SELECT * FROM Departments
where
name = ''
ORDER BY idDepartamentoUps! Is it my code or is it a new bug? Iīm thinking about change to psicopg... Is it a good idea?
Antonio Carrasco