Re: string matching in mysql and php
| From: | Monte Ohrt | Date: | Thu, 14 Sep 2000 16:13:36 +0000 |
| Subject: | Re: string matching in mysql and php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-16804@lists.php.net to get a copy of this message | ||
select * from articles where content rlike '[[:<:]]anna[[:>:]]';
Anna Soobrattee wrote:
>
> hi all,
>
> how can i search my database for a particular occurence of a string?
>
> select * from articles where content like "%anna%" - pulls out
> everything containing the word anna and the substring anna, but i
> would like to pull out article where the content contains the word
> "anna" and not the substring anna.
>
> had a look at the REGEXP funtion in the mysql documentation..but i
> don't think i have got the syntax correct.
>
> Can anyone help ?
>
> thanks
> anna
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/