[Zope] Help with SQL Like statement

Michel Pelletier michel@digicool.com
Wed, 06 Oct 1999 17:26:02 -0400


Mats Nordgren wrote:
> 
> Hi again,
> 
> I have a question regarding the ZSQL methods.
> 
> How do you use LIKE in your sql statements?
> 
> ex:
> 
> SELECT *
> FROM clients
> WHERE last_name LIKE <dtml-sqlvar search_criteria type=string>%

<dtml-sqlvar "search_criteria + '%'" type=string>

the quoting is important and 'search_criteria' must be a string.

-Michel