[Zope] ZSql Method with like.

Thomas B. Passin tpassin@mitretek.org
Fri, 8 Jun 2001 14:33:09 -0400


Try 

SELECT field1 FROM table WHERE field2 LIKE '%'+<dtml-sqlvar
arg type=string>+'%'

(I haven't tested this).  Or use <dtml-var> instead of <dtml-sqlvar>.

Tom P


[After Dark]

How should I do to use 'like' with ZSql Method? Similar to
the example:

Ex.:
SELECT field1 FROM table WHERE field2 LIKE '%test%'

I tryed this: --> arq is an argument

select field1 from table where field2 like '%<dtml-sqlvar
arg type=string>%'

Then I get this: select field1 from table where field2 like
'%'agx'%'
I need to put the char '%' with the var.