[Zope-dev] ZSQL using LIKE operator
Dieter Maurer
dieter@handshake.de
Thu, 8 Feb 2001 21:29:25 +0100 (CET)
Schmidt, Allen J. writes:
> .... how to resolve a query which I need to read:
>
> SELECT * FROM table WHERE keywords LIKE '%keywords_variable%'
>
> <dtml-sqltest> has 'op=like' and when set to 'type=string' produces the LIKE
> operation in the query, with single quotes, but I cannot get it to 'wrap'
> the keywords with the percent characters and THEN the single quotes to
> produce that which I have in the query above.
<dtml-sqltest expr="'%%%s%%' % keywords_variable" column=keywords_variable ...>
Dieter