[Zope] % in Z SQL Methods

Peter Bengtsson peter@grenna.net
Mon, 26 Feb 2001 16:19:42 -0000


cool.
thanks.

I never thought of it that way.

----- Original Message ----- 
From: "Daniel Rusch" <drusch@globalcrossing.com>
To: "Peter Bengtsson" <peter@grenna.net>
Sent: Monday, February 26, 2001 4:02 PM
Subject: Re: [Zope] % in Z SQL Methods


> Try this:
> 
> WHERE c.company_code = <dtml-sqlvar my_company_code type=string> 
> AND (UPPER(last_name) LIKE UPPER(<dtml-sqlvar
> "'%'+_.string.strip(FindItem)+'%'" type=string>)
> 
> Peter Bengtsson wrote:
> > 
> > Using the dtml-sqlvar syntax is it possible squeeze in a % sign in the
> > expression?
> > 
> > Today I use this syntax: WHERE firstname LIKE '<dtml-var firstname>%'
> > 
> > Peter
> > 
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )