This is quite weird but my search function can search for any word except the word "grinder" from my item table. I have tried everything but it does not seem to search for that word. Can anyone help me please?
CREATE FULLTEXT INDEX item_name_other_name_desc_index
ON item (name,other_name,description)
public static function Search($string)
{
$delims = ',.; ';
$word = strtok($string,$delims);
while($word)
{
$result['accepted'][] = $word;
$word = strtok($delims);
}
$string = implode(" ", $result['accepted']);
$sql = 'SELECT item_id,name,other_name,description,price,discounted_price, thumbnail_photo,large_photo
FROM item
WHERE
MATCH(name,other_name,description)
AGAINST(:string)' ;
$parameters = array(':string' => $string);
$result['items'] = DB::GetAll($sql,$parameters);
return $result;
}
The names of the items:
9 In 15 AMP Motor Angle Grinder
8 In Bench Grinder
1/4 In Angle Die Grinder
7 In Angle Grinder
3 In Straight Grinder
Ryobi HP512K cordless drill/driver kit
6-Pack Spray Paint
Non-Contact Voltage Tester
When I change the above to :
9 In 15 AMP Motor Angle Grinder
8 In Bench Grind
1/4 In Angle Die Grind
7 In Angle Grind
3 In Straight Grind
Ryobi HP512K cordless drill/driver kit
6-Pack Spray Paint
Non-Contact Voltage Tester
and I search for Grinder, the record => 9 In 15 AMP Motor Angle Grinder is being displayed.