mysql> select * from test;
+---+-------------------------------------------------------------------+
| a | b                                                                 |
+---+-------------------------------------------------------------------+
| 1 | The children are playing on the play-ground                       |
| 2 | And some other sentence too                                       |
| 3 | Just for testing purposes                                         |
| 4 | Even though I do not like children, I will mention them once more |
+---+-------------------------------------------------------------------+

mysql> select * from test where b LIKE '%child%';
+---+-------------------------------------------------------------------+
| a | b                                                                 |
+---+-------------------------------------------------------------------+
| 1 | The children are playing on the play-ground                       |
| 4 | Even though I do not like children, I will mention them once more |
+---+-------------------------------------------------------------------+

The search can *NOT* be done on a 'fulltext' index, though...

From: "Nessi" <[EMAIL PROTECTED]>
To: "Sebastiaan J.A. Kamp" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, June 26, 2001 2:31 PM
Subject: Re: Full text search gotchas


> Hello,
> 
> thanks for your reply. I was wondering...I thought the LIKE function
> is only for single words? I have to admit I never tested it and started
> right off with fulltext option.
> So would following work then...
> 
> Lets assume one entry in somefield is: "The children are playing on the
> play-ground" and I want to search for it using LIKE:
> 
> SELECT * FROM yourtable WHERE somefield LIKE '%child%';
> 
> Would that then give me above entry in the output?!?

Reply via email to