Can't get multiple to work in dtml-sqltest
Mark Phillips <[email protected]> Fri, 1 Oct 2010 18:32:33 -0700
| Newsgroups | gmane.comp.web.zope.database |
|---|---|
| Message-ID | <[email protected]> |
--===============3264477401330507539==
Content-Type: multipart/alternative; boundary=000e0cd341c20b5d020491984908
--000e0cd341c20b5d020491984908
Content-Type: text/plain; charset=ISO-8859-1
I have a ZSQL query getPlayersBySeasons with one input value, seasonID:
select distinct player.playerID, firstName, lastName, number, birthdate,
positions, bats, throws, active
from player, SeasonPlayer
<dtml-sqlgroup required where>
<dtml-sqltest seasonID column=SeasonPlayer.seasonID type=int optional
multiple>
<dtml-and>
SeasonPlayer.playerID=player.playerID
</dtml-sqlgroup>
and my python code:
players = context.getPlayersBySeasons(seasonID=s).dictionaries()
If s = [1], or s=[2], or s=[1,2] or s="", I get the same result set back.
What is the correct syntax for using the multiple key word? I have googled
and it seems that a lot of people have problems, and no one has a solution.
Thanks!
Mark
--000e0cd341c20b5d020491984908
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I have a ZSQL query getPlayersBySeasons with one input value, seasonID:<br>=
<br>select distinct player.playerID, firstName, lastName, number, birthdate=
, positions, bats, throws, active<br>from player, SeasonPlayer<br><dtml-=
sqlgroup required where><br>
=A0=A0=A0 <dtml-sqltest seasonID column=3DSeasonPlayer.seasonID type=3Di=
nt optional multiple> <br>=A0=A0=A0 <dtml-and><br>=A0=A0=A0 Season=
Player.playerID=3Dplayer.playerID<br></dtml-sqlgroup><br><br>and my p=
ython code:<br>players =3D context.getPlayersBySeasons(seasonID=3Ds).dictio=
naries()<br>
<br>If s =3D [1], or s=3D[2], or s=3D[1,2] or s=3D"", I get the s=
ame result set back.<br><br>What is the correct syntax for using the multip=
le key word? I have googled and it seems that a lot of people have problems=
, and no one has a solution.<br>
<br>Thanks!<br><br>Mark<br>
--000e0cd341c20b5d020491984908--
--===============3264477401330507539==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Zope-DB mailing list
[email protected]
https://mail.zope.org/mailman/listinfo/zope-db
--===============3264477401330507539==--