[Zope] More Zope/PostGreSQL/PoPyDA.

acg acarrasco@udiberica.com
Mon, 27 Aug 2001 14:28:09 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_0127_01C12F04.7EB48920
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

My personal configuration:
 ZPoPyDA 2.0.7
 Zope 2.4.0
 Python 2.1.1   =20
 Debian/GNU Linux

Another bug or is it only a bad dtml construction?
Again from ZopeBook I see this
   =20
Examples

Sample usage:

select * from employees

<dtml-sqlgroup where>

<dtml-sqltest salary op=3Dgt type=3Dfloat optional>

<dtml-and>

<dtml-sqltest first op=3Deq type=3Dstring multiple optional>

<dtml-and>

<dtml-sqltest last op=3Deq type=3Dstring multiple optional>

</dtml-sqlgroup>

(...)

If salary is 50000 and last is Smith it renders:

select * from employees

where

(salary > 50000.0

and

last=3D'Smith'

)

Mmmm..., is ZPoPyDA supposse to do that? I don=B4t think so. My code:

Arguments: id, name.

 SELECT * FROM Departments
<dtml-sqlgroup where>
 <dtml-sqltest id op=3Deq type=3Dint optional>
<dtml-and>
 <dtml-sqltest name op=3Deq type=3Dstring optional> IT WORKS!!! with the =
fix by Jim Penny
</dtml-sqlgroup>
ORDER BY id

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

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

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

Antonio Carrasco





------=_NextPart_000_0127_01C12F04.7EB48920
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3103.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>My personal configuration:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;ZPoPyDA 2.0.7</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;Zope 2.4.0</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;Python 2.1.1&nbsp;&nbsp;&nbsp; =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;Debian/GNU Linux</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Another bug or is it only a bad dtml=20
construction?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Again from ZopeBook I see =
this</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; <B><FONT =
face=3DArial size=3D4>
<P>Examples</P></B></FONT><FONT face=3D"Times New Roman" size=3D3>
<P>Sample usage:</P></FONT><FONT face=3DCourier size=3D1>
<P>select * from employees</P>
<P>&lt;dtml-sqlgroup where&gt;</P>
<P>&lt;dtml-sqltest salary op=3Dgt type=3Dfloat optional&gt;</P>
<P>&lt;dtml-and&gt;</P>
<P>&lt;dtml-sqltest first op=3Deq type=3Dstring multiple =
optional&gt;</P>
<P>&lt;dtml-and&gt;</P>
<P>&lt;dtml-sqltest last op=3Deq type=3Dstring multiple optional&gt;</P>
<P>&lt;/dtml-sqlgroup&gt;</P></FONT><FONT face=3D"Times New Roman" =
size=3D3></FONT>
<P>(...)</P><FONT face=3D"Times New Roman" size=3D3>
<P>If </FONT><FONT face=3DCourier size=3D3>salary </FONT><FONT=20
face=3D"Times New Roman" size=3D3>is 50000 and </FONT><FONT =
face=3DCourier size=3D3>last=20
</FONT><FONT face=3D"Times New Roman" size=3D3>is </FONT><FONT =
face=3DCourier=20
size=3D3>Smith </FONT><FONT face=3D"Times New Roman" size=3D3>it=20
renders:</P></FONT><FONT face=3DCourier size=3D1>
<P>select * from employees</P>
<P>where</P>
<P>(salary &gt; 50000.0</P>
<P>and</P>
<P>last=3D'Smith'</P>
<P>)</P>
<P><FONT face=3DArial size=3D2>Mmmm..., is ZPoPyDA supposse to do that? =
I don=B4t=20
think so. My code:</FONT></P>
<P><FONT face=3DArial size=3D2>Arguments: id, name.</FONT></P>
<P><FONT face=3DArial size=3D2>&nbsp;SELECT * FROM =
Departments<BR>&lt;dtml-sqlgroup=20
where&gt;<BR>&nbsp;&lt;dtml-sqltest id op=3Deq type=3Dint=20
optional&gt;<BR>&lt;dtml-and&gt;<BR>&nbsp;&lt;dtml-sqltest name op=3Deq=20
type=3Dstring optional&gt; IT WORKS!!! with the fix by Jim=20
Penny<BR>&lt;/dtml-sqlgroup&gt;<BR>ORDER BY id</FONT></P>
<P><FONT face=3DArial size=3D2>My Query Result without blanks arguments, =
Zope=20
renders...</FONT></P>
<P><FONT face=3DArial size=3D2>SELECT * FROM =
Departments<BR>where<BR>name =3D=20
''<BR>ORDER BY idDepartamento</FONT></P>
<P><FONT face=3DArial size=3D2>Ups! Is it my code or is it a new bug? =
I=B4m thinking=20
about change to psicopg... Is it a good idea?</FONT></P>
<P><FONT size=3D2><FONT face=3DArial>Antonio =
Carrasco</FONT><BR></FONT></P>
<P>&nbsp;</P></FONT></FONT></DIV></BODY></HTML>

------=_NextPart_000_0127_01C12F04.7EB48920--