[Zope-DB] zSQL method question

Geir Bækholt Geir Bækholt
Sat, 1 Mar 2003 21:22:47 +0100


Hello Marc,

Saturday, March 1, 2003, 6:58:11 PM, you wrote:

MS> I apologize if this is a particularly stupid question, but...

MS> I want to search against a text field in MySQL using a zSQL method such that
MS> my search query is wrapped in % wildcard characters.

MS> select * from xyz where
MS> <dtml-sqltest search_query column=txCriteria op=like type=string>

perhaps   (untested) this will work ?
<dtml-sqltest expr="'%'+str(search_query)+'%'" column=txCriteria op=like type=string>


--
Geir Bækholt