[Zope] Two questions about passing lists to sql methods

Jeff Huang chang_liu@hotmail.com
Tue, 04 Sep 2001 17:44:49 +0000


I wrote something like this

select * from table
where <dtml-in "('a', 'b', 'c')">
        <dtml-let temp=sequence-item>
          colum like <dtml-sqlvar "'%' + _.string.strip(temp) + '%'" 
type=string> or
        </dtml-let>
        <dtml-if sequence-end>
          1=2
        </dtml-if>
      </dtml-in>

This worked fine, but when I replaced <dtml-in "('a', 'b', 'c')"> with 
<dtml-in keyWords> and call this method from another page as <dtml-var 
expr="sqlMethod(keyWords=('a', 'b', 'c'))">, nothing returns. Why? I then 
try to pass a list directly using test feature, but no matter what I input 
it always tell me 'no string allowed in the dtml-in function'. What did I do 
wrong?

Jeff



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp