How do I query the database that ignores accents and other special characters?
I have the products table that has the name field with the following values:
" shoes", "Tennis", "Karaoke and Videokê", etc ...
No BD
product names are accented and separated by space.
My URL: http://meusite.com.br/produtos/calcados
The products page receives the value "calcado" and check if there are products with that name.
The problem is that, because the bank name of the product is recorded with accents and spaces, when I send "shoes" I can not find anything, since I only have " shoes ".
I would also like it to consider composite words like:
Karaoke and Video, Karaoke, Video ...
SQL Query
$con = $pdo->query("SELECT * FROM ws_cat_sub WHERE sub_categoria = 'calcados' ");
$return_id = $con->fetch(PDO::FETCH_OBJ);