Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: DB
Problem with <dtml-sqltest ... multiple> feature
 

Index | Next | Previous | View Flat


ken at sunward

Feb 13, 2008, 6:00 PM


Views: 1416
Permalink
Problem with <dtml-sqltest ... multiple> feature

This ZSQL method:

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

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:

select
organization_id, name, url_name, short_name
from
organization
where
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?

~ Ken

_______________________________________________
Zope-DB mailing list
Zope-DB[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-db

Subject User Time
Problem with <dtml-sqltest ... multiple> feature ken at sunward Feb 13, 2008, 6:00 PM
    Re: Problem with <dtml-sqltest ... multiple> feature lukesh at seznam Feb 14, 2008, 3:07 AM
    Re: Problem with <dtml-sqltest ... multiple> feature ahumboldt at humboldt Feb 14, 2008, 3:32 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.