[Zope-DB] Problem with <dtml-sqltest ... multiple> feature

Jaroslav Lukesh lukesh at seznam.cz
Thu Feb 14 06:07:56 EST 2008

Try to set url_name as ['HI','RF'] and use property without datatype, like


And of course, look at ZopeBook.

Personally I dont use sqltest nor sqlgroup because there are many caveats 
with queries to cooperate with other zope unfriendly SQL developers. I use 
dtml-in inside ZSQL method with parameters defined as above.

----- Original Message ----- 
From: "Ken Winter" <ken at sunward.org>

    organization_id, name, url_name, short_name
<dtml-sqlgroup where>
    <dtml-and> <dtml-sqltest organization_id op="eq" type="int" multiple
    <dtml-and> <dtml-sqltest url_name op="eq" type="nb" multiple optional>
    <dtml-and> <dtml-sqltest name op="eq" type="nb" multiple optional>

doesn't work properly when I give it "a sequence of values to test the
condition against", which is what the "multiple" tag is supposed to allow
according to http://www.plope.com/Books/2_7Edition/AppendixA.stx#1-15 .
When I enter (for example) the string "HI, RF" (without the surrounding
quotes) into the url_name field on the ZSQL method's ZMI Test tab, it
returns no records and says that the SQL it generated was:

    organization_id, name, url_name, short_name
url_name = 'HI, RF'

If I enter a series of integers such as "11530, 11531" (again, minus the "s)
into the organization_id field, it returns the error message:

Invalid integer value for organization_id

Entering a single value into any of these fields works fine.  I have tried
various ways of quoting, delimiting, and otherwise punctuating my
multiple-value arguments, to no avail.

Is this problem just because the "multiple" feature doesn't work when tested
in the ZMI?  If so, can you tell me the correct way to type and format the
multiple-valued arguments when calling the ZSQL method from Python or from a
Page Template?


More information about the Zope-DB mailing list