Link to home
Start Free TrialLog in
Avatar of narmi2
narmi2

asked on

Match Against help

Dear Experts,

I have the following

$str_phrase = htmlentities($_GET['phrase']);

which is then used in a mysql query like so

where match (col1, col2) against ('$str_phrase')

But this does not let me use the + and - keys on the web page.  For example

Lets say the user types in the following

I am searching for information about +water -sand

It seems to ignore the + and - in that string.

How do I stop ignoring them?
Avatar of mahome
mahome
Flag of Germany image

Yoiu must use boolean mode: http://dev.mysql.com/doc/refman/5.1/en/fulltext-boolean.html


where match (col1, col2) against ('$str_phrase' in boolean mode)

Open in new window

Avatar of narmi2
narmi2

ASKER

I am using MySQL 3.XX and boolean mode did not exist until MySQL 4.XX
ASKER CERTIFIED SOLUTION
Avatar of mahome
mahome
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial