Micha Berdichevsky <[EMAIL PROTECTED]> wrote on 14/04/2005 12:53:31:

> Hi group.
> I have a table with a varchar(250) column in it (let's call it c)
> I want to select values that contain a number of given words in them 
> (three or more), in any words order
> I currently use
> SELECT * FROM table WHERE c LIKE "%word1%word2%word3%";
> I was wandering if it is possible to use a query where the LIKE (or 
> anything else) searches for my given strings in any order.
> I'm using MySQL 4.1.11 on windows XP, if it matters.

I think you want to do a FULLTEXT search: see
http://dev.mysql.com/doc/mysql/en/fulltext-search.html

This requres using a FULLTEXT index on your column and using the MATCH 
command.

        Alec



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

Reply via email to