Hi, I like to create a SQL Method that does a query like select * from account_info where account like "%foobar%" But I only get equality tests or a query that looks like that select * from account_info where account like "%'foobar'%" I think, that this is easy but I can't see the solution for this? Thanks, Oliver -- Oliver Andrich, RZ-Online, Schlossstrasse Str. 42, D-56068 Koblenz Telefon: +49-261-39210-40 Fax: -33 | http://rhein-zeitung.de | http://andrich.net GMC d- s++:++ a- C++ UL++++ P-- L+++ E--- W++ N+ w-- O- M-- V- PS++ PE Y+ PGP+ t 5+ X R+ tv+ b++ DI++ D- G e h- r z+
Use <!--#var foobar sql_quote--> instead of <!--#sqlvar foobar-->. At 08:55 PM 9/22/99 +0200, Oliver Andrich wrote:
Hi,
I like to create a SQL Method that does a query like
select * from account_info where account like "%foobar%"
But I only get equality tests or a query that looks like that
select * from account_info where account like "%'foobar'%"
Oliver Andrich wrote:
I like to create a SQL Method that does a query like
select * from account_info where account like "%foobar%"
But I only get equality tests or a query that looks like that
select * from account_info where account like "%'foobar'%"
You are probably using <dtml-sqlvar foobarVar type=string>. Try to use <dtml-var foobarVar> to get it without the '. If it doesn't work try to post your ZSQL method code. []s -- Paulo Eduardo Neves maito:neves@email.com
participants (3)
-
Oliver Andrich -
Paulo Eduardo Neves -
Phillip J. Eby