Answer the question
In order to leave comments, you need to log in
How to make PostgreSQL not distinguish between the letters "E" and "Yo"?
It is necessary that the type query
returns (including) records where
Well, and vice versa.
I remember that in MySQL this was possible. select * from tbl where surname = 'фёдоров';
surname = 'федоров'.
Answer the question
In order to leave comments, you need to log in
Solved such a problem. Came to what to do through the regular season.
If the query string contains the letter "e", then all occurrences are replaced by [e|e]
$q = str_replace('e', '[e|e]', $q);
and in sql already comes with
select *
from tbl
WHERE tbl.name SIMILAR TO '%ж[е|ё]лтый%'
The solution could be this:
select * from tbl where replace(surname, 'ё', 'е') = '{$surname}';
It is probably still possible to exclude this notorious letter e in the database
. In Mysql, this query will replace all letters, if it fits, then it will be possible to avoid problems in the future. They change something in the code, dig a hole for themselves.
UPDATE table SET field = REPLACE(field, 'ё', 'е');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question