November 4th, 2000, 02:25 PM
-
Hello again,
I want to search a field for "gore" and return values such as:
"gore,_al"
"gore_and_horror"
"done_with_gore"
(and NOT "goreathon")
I have a MySQL statement, but it returns no results. why?
SELECT title FROM search_cat WHERE title REGEXP '(^|_)gore(,|_|$)';
Thank you.
yoshi
datera@datera.com http://www.datera.com
[This message has been edited by yoshi (edited November 04, 2000).]
November 5th, 2000, 12:23 AM
-
Would this work?
SELECT * FROM your_table WHERE title REGEXP '_?gore(_|,|$)';
---John Holmes...
November 5th, 2000, 11:50 AM
-
Thanks for the help.
I have found "(^|_)Gore(_|,|$)" to work, but I have just realized that it is case-sensitive. Any ideas to stop or work with that?
Thanks again,
yoshi
datera@datera.com http://www.datera.com
November 6th, 2000, 04:40 AM
-
Use:
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
SELECT * FROM your_table WHERE LCASE(title) REGEXP '_?gore(_|,|$)';
[/code]