Re: Search MySQL and Match Whole Words
| From: | Matt Palermo | Date: | Thu, 22 Apr 2004 23:48:52 +0000 |
| Subject: | Re: Search MySQL and Match Whole Words | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184319@lists.php.net to get a copy of this message | ||
That will work if there is only one word in the column I'm searching, but
the columns I'm searching are in paragraph form, so the = will not work
there if I want to just match one word from the whole paragraph...
"Ligaya Turmelle" <lig@mgpt.com> wrote in message
news:20040422234409.72538.qmail@pb1.pair.com...
> why not just use WHERE word = "inputWord" and skip the whole LIKE thing
for
> an exact match? Is that what you mean?
>
> Respectfully,
> Ligaya Turmelle
>
> "Matt Palermo" <webmaster@sweetphp.com> wrote in message
> news:20040422212640.11873.qmail@pb1.pair.com...
> > I was wondering if anyone knows how to do whole word searches in mysql.
I
> > have a search textbox that users can enter in multiple words to search
for
> > in the database, but things like the mysql LIKE match any part of a
word.
> > Is there a way to search for whole word matches only? Please let me
know
> if
> > you can help.
> >
> > Thanks,
> >
> > Matt
> > http://sweetphp.com