[Zope] Help with SQL Like statement
Phil Harris
phil@philh.org
Wed, 6 Oct 1999 21:59:06 +0100
You could use the alternate syntax,
SELECT *
FROM clients
WHERE last_name LIKE '<dtml-var search_criteria >%'
-----Original Message-----
From: drmental@server.rbf.com [mailto:drmental@server.rbf.com]On Behalf
Of Mats Nordgren
Sent: 06 October 1999 21:35
To: zope@zope.org
Subject: [Zope] Help with SQL Like statement
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>%
the problem arises because the type automatically adds the ''
around the search_criteria and the percentage sign needs to be
inside the '' as in 'Smi%' for all accounts that start with Smi.
Thanks in advance.
--
Mats Nordgren
First Union Securities
mats@launchnet.com
icq: 14659299
_______________________________________________
Zope maillist - Zope@zope.org
http://www.zope.org/mailman/listinfo/zope
(Related lists - please, no cross posts or HTML encoding!
To receive general Zope announcements, see:
http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org -
http://www.zope.org/mailman/listinfo/zope-dev )