----- Original Message -----
From: acg
To: zope@zope.org
Sent: Monday, August 27, 2001 2:28 PM
Subject: [Zope] More Zope/PostGreSQL/PoPyDA.

My personal configuration:
 ZPoPyDA 2.0.7
 Zope 2.4.0
 Python 2.1.1   
 Debian/GNU Linux
 
Another bug or is it only a bad dtml construction?
Again from ZopeBook I see this
   

Examples

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 id

My Query Result without blanks arguments, Zope renders...

 

Sorry,.., a bug in my e-mail. This is My query result with blank arguments or without arguments... Zope renders

SELECT * FROM Departments
where
name = ''
ORDER BY idDepartamento

Ups! Is it my code or is it a new bug? Iīm thinking about change to psicopg... Is it a good idea?

Antonio Carrasco