Re: Searching for a whole word
| From: | Jamie Alessio | Date: | Tue, 21 Nov 2000 18:32:43 +0000 |
| Subject: | Re: Searching for a whole word | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-4621@lists.php.net to get a copy of this message | ||
> I need to search in a MySQL table for a whole word. When I do it
> from msyql prompt it's ok :
>
> select * from table_name where column_name REGEXP '[[:<:]]word[[:>:]]'
>
Why not try something like
select * from table_name where column_name LIKE '%word%'
That should match the word you are looking for without having to use a regular expression.
- Jamie