An alternative is:
select * from students
where surname like '%<dtml-var surname sql_quote>%'
This is a bit more succinct, but if you use it, be sure not to
forget the sql_quote, or you will be open to sql injection problems.
[EMAIL PROTECTED] wrote on 02/16/2007 02:57:37 AM:
> On Fri, 2007-02-16 at 07:38 +0100, robert rottermann wrote:
> > I do not think any one of us can help you unless you tell us what
> > exactly your problem with installing pymssql ist.
> > by the way: do you mean MySQLdb?
> > there is very good documentation on using Z SQL in the zope book:
> > http://www.plope.com/Books/2_7Edition/RelationalDatabases.stx
> > there you find examples how to use a query with like.
> > robert
> Here's an example of how to use like and wildcards in sqlvar's
> select * from students
> where surname ilike <dtml-sqlvar expr="'%'+surname+'%'" type="string">
> Zope-DB mailing list
Zope-DB mailing list