Skip to main content
Clarified the issue, added some tags
Source Link
mickmackusa
  • 4.9k
  • 4
  • 20
  • 49

"LIKE" only returns exact How to match database values regardless of accents on letters?

With the following "LIKE" iLIKE condition in my WHERE clause, I only get the exact match. ..... . ' LIKE '. $db->quote($db->escape($artist)), 'AND')...... What i want is when $artist

. ' LIKE '. $db->quote($db->escape($artist)), 'AND') . 

When $artist is e.g. Beyoncé, for example Beyoncé, it only returns a value when $artist$artist is exactly "Beyoncé"Beyoncé. 

I want it to return a value as well when the database value is "Beyonce"Beyonce.

I found solutions where there is no variabelvariable (something with '%'%), but I can't get this to work.

"LIKE" only returns exact match

With the following "LIKE" i only get the exact match. ..... . ' LIKE '. $db->quote($db->escape($artist)), 'AND')...... What i want is when $artist is e.g. Beyoncé, it only returns a value when $artist is exactly "Beyoncé". I want it to return a value as well when the database value is "Beyonce".

I found solutions where there is no variabel (something with '%'), but can't get this to work

How to match database values regardless of accents on letters?

With the following LIKE condition in my WHERE clause, I only get the exact match.

. ' LIKE '. $db->quote($db->escape($artist)), 'AND') . 

When $artist is, for example Beyoncé, it only returns a value when $artist is exactly Beyoncé. 

I want it to return a value as well when the database value is Beyonce.

I found solutions where there is no variable (something with %), but I can't get this to work.

Source Link
Theon
  • 11
  • 1

"LIKE" only returns exact match

With the following "LIKE" i only get the exact match. ..... . ' LIKE '. $db->quote($db->escape($artist)), 'AND')...... What i want is when $artist is e.g. Beyoncé, it only returns a value when $artist is exactly "Beyoncé". I want it to return a value as well when the database value is "Beyonce".

I found solutions where there is no variabel (something with '%'), but can't get this to work