[thelist] msql: using an index to search across columns?
rudy
rudy937 at rogers.com
Mon Sep 29 13:35:06 CDT 2003
> Ugh.
you are right, but "ugh" is a bit strong when
referring to *my* sql, eh?
;o)
> Perhaps you want to put a space in between
> instead of a straight concatenation?
good idea -- will a pipe character suffice, do you think?
select title, body
from blog_post
where concat_ws('|',title,body) LIKE '%telegraph%'
and concat_ws('|',title,body) LIKE '%death%'
cute function, n'est-ce pas?
see http://www.mysql.com/doc/en/String_functions.html
as for the overflow, i dunno, the manual doesn't say, but
i doubt it would -- that's such a microsofty thing to do...
rudy
More information about the thelist
mailing list