> On Aug 28, Ed Carp wrote:
> > How do I do exact phrase matches using FULLTEXT?
> > I have this 2 million row table, full of text data, that I want
> to search
> > for an exact phrase. When I say:
> > select * from Laws WHERE MATCH(Line) AGAINST ('MDMA') ORDER BY ID;
> > It works correctly, returning 1 row, MUCH faster than doing a
> "select ...
> > LIKE"!
> > But when I do:
> > select * from Laws WHERE MATCH(Line) AGAINST ('growth hormone')
> ORDER BY ID;
> > MySQL returns every row with either "growth" OR "hormone" in
> it, which isn't
> > what I wanted. Is there a way to only return the rows where the exact
> > phrase "growth hormone" is present?
> select * from Laws WHERE MATCH(Line) AGAINST ('growth hormone') AND
> Line like '%growth hormone%' ORDER BY ID;
It works - thanks! Hmmm...why didn't I think of that? ;)
Ed Carp, N7EKG - erc@stripped - 214/341-4420 -
Squished Mosquito, Inc.
Internet Applications Development
Escapade Server-Side Scripting Language Development Team
Pensacola - Dallas - Dresden - London - Paris