This is the code:
$paramater = "@CityNameWithñ";
$stmt = $connection->prepare("
SELECT `col1`,`col2`
FROM `table`
WHERE MATCH (`col3`,`col4`)
AGAINST ( ? IN BOOLEAN MODE)
AND `status` = 'a'");
$stmt->bind_param("s",$parameter);
$stmt->execute();
$stmt->bind_result($r1,$r2);
while($stmt->fetch()){
var_dump($r1);
}
The above doesn't return anything. But if $parameter
has a value of for example @CityName
it works. I think the ñ
is the one causing the problem?
I tried it in phpMyAdmin
SELECT `col1`,`col2`
FROM `table`
WHERE MATCH (`col3`,`col4`)
AGAINST ( '@CityNameWithñ' IN BOOLEAN MODE)
AND `status` = 'a'
It works. It returned 980 results.
Any idea what is making it fail in my query?