here are my data from table Companies column cName
CK'Wang Pte Ltd
Chong Wang Pte Ltd
CK'Studio Pte Ltd
here are my query
$query = mysql_query("SELECT cName FROM Companies WHERE MATCH cName AGAINST ('+CK\'Wang Pte Ltd' IN BOOLEAN MODE)");
$result = mysql_num_rows($query);
the $result show 2. How can i only MATCH 1 (CK'Wang Pte Ltd) instead of 2
If you want all of the terms to match in boolean mode, you need to add a + in front of every term. The way the query is interpreted, CK is mandatory, all other terms are optional and will mostly affect the ranking of results.
If you need to build the query from a user request and match all terms, you will need to convert it first.
Your final query would look something like this: