5
I’m having a problem with a search I did where the user filter content by district and county, is working well when I choose district and county without accents but when I choose a district and a county that contains accents does not return me any values I would like to know how I can resolve situation ?
PHP
$result_categoria = mysql_query("select * from categorias_estabelecimentos where categoria_slug='".$categoria."'");
while($row_categoria = mysql_fetch_object($result_categoria)){
$result_local=mysql_query("select * from estabelecimentos where id='".$row_categoria->estabelecimento_id."' and distritos='".$distritos."' and concelhos='".$concelhos."' and activo=1");
while($row_local=mysql_fetch_object($result_local)){
if(mysql_num_rows($result_local)>0){
$result_anexo_local=mysql_query("select * from estabelecimentos_anexos where id_mae='".$row_local->id."' and seccao='thumbnail'");
$row_anexo_local=mysql_fetch_object($result_anexo_local);
What is the collation used in your table?
– bfavaretto
utf8_unicode_ci
– César Sousa
Try with
LIKE
then:... and distritos LIKE '".$distritos."' and concelhos LIKE '".$concelhos."' and ...
– bfavaretto
I tried like I said Didn’t solve
– César Sousa
What is the character set? utf-8?
– bruno
Try implementing this function in your https://gist.github.com/williamurbano/f4c8d23a0e0d21622334database
– William Urbano