[Zope] More Zope/PostGreSQL/PoPyDA.
acg
acarrasco@udiberica.com
Mon, 27 Aug 2001 14:51:15 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_0147_01C12F07.B8D492A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
----- Original Message -----=20
From: acg=20
To: zope@zope.org=20
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 =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...
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 =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_0147_01C12F07.B8D492A0
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> </DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A href=3D"mailto:acarrasco@udiberica.com" =
title=3Dacarrasco@udiberica.com>acg</A>=20
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
href=3D"mailto:zope@zope.org"=20
title=3Dzope@zope.org>zope@zope.org</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Monday, August 27, 2001 =
2:28=20
PM</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [Zope] More=20
Zope/PostGreSQL/PoPyDA.</DIV>
<DIV><BR></DIV>
<DIV><FONT face=3DArial size=3D2>My personal =
configuration:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> ZPoPyDA 2.0.7</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> Zope 2.4.0</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> Python 2.1.1 =20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> Debian/GNU Linux</FONT></DIV>
<DIV> </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> <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><dtml-sqlgroup where></P>
<P><dtml-sqltest salary op=3Dgt type=3Dfloat optional></P>
<P><dtml-and></P>
<P><dtml-sqltest first op=3Deq type=3Dstring multiple =
optional></P>
<P><dtml-and></P>
<P><dtml-sqltest last op=3Deq type=3Dstring multiple =
optional></P>
<P></dtml-sqlgroup></P></FONT><FONT face=3D"Times New Roman"=20
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=20
size=3D3>last </FONT><FONT face=3D"Times New Roman" size=3D3>is =
</FONT><FONT=20
face=3DCourier 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 > 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> SELECT * FROM=20
Departments<BR><dtml-sqlgroup where><BR> <dtml-sqltest =
id op=3Deq=20
type=3Dint optional><BR><dtml-and><BR> <dtml-sqltest =
name op=3Deq=20
type=3Dstring optional> IT WORKS!!! with the fix by Jim=20
Penny<BR></dtml-sqlgroup><BR>ORDER BY id</FONT></P>
<P><FONT face=3DArial size=3D2>My Query Result without blanks =
arguments, Zope=20
renders...</FONT></P>
<P> </P></DIV></BLOCKQUOTE>
<DIV><FONT face=3DArial size=3D2>Sorry,.., a bug in my e-mail. This is =
My query=20
result with blank arguments or without arguments... Zope =
renders</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV>
<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> </P></FONT></FONT></DIV></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0147_01C12F07.B8D492A0--