Re: Please help me about driver adapter

[email protected]
Newsgroups gmane.comp.web.zope.database
Message-ID <OFA5F5AEAB.2B6261BE-ON85257284.0055A960-05257284.00565EDC@YKK-USA.COM>
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.

jim penny

[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">
> 
> Regards
> Garry
> 
> _______________________________________________
> Zope-DB mailing list
> [email protected]
> http://mail.zope.org/mailman/listinfo/zope-db
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.