Finally I decided to use:
------
SELECT id FROM mytable WHERE MATCH(firstname, lastname, comments)
AGAINST ('+"johnie"' IN BOOLEAN MODE) ORDER BY firstname, lastname
--------
It works (except with acute vowel words in UTF8).

Thank you very much.

On 9/20/07, Baron Schwartz <[EMAIL PROTECTED]> wrote:
> thomas Armstrong wrote:
> >> If you need something more complicated, such as only ignoring "(", then you
> >> need to get more complicated. You might even need a regular expression.
> > I'm to browse:
> > http://dev.mysql.com/doc/refman/5.0/en/regexp.html
> > http://www.wellho.net/regex/mysql.html
>
> You know, you don't have to do fancy regexp matching or even LIKE.
> There's really no advantage to using those over what looks like it'll be
> simpler in this case:  INSTR().
>
> SELECT INSTR('John (Johnie)', 'Johnie') AS John, INSTR('Peter',
> 'Johnie') AS Peter;
> +------+-------+
> | John | Peter |
> +------+-------+
> |    7 |     0 |
> +------+-------+
>
> Just say "WHERE INSTR(haystack, needle) > 0" in your WHERE clause, and
> you're done.
>

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to