I'm trying to set up a database search like this
$tmpn = mysql_query("SELECT * FROM articles WHERE LOCATE(lower('".$sear."'), lower(name))"); The $ sear variable naturally contains the word — but for some reason it is not case-sensitive for it ((please tell me that I don’t have this way I google on a couple of forums, but for some reason it’s looking only for case-sensitive (
I’ll add something that on the local version of the site going into phpMyadmin the Cyrillic in the fields of the tables is displayed normally - but also the base on the hosting issues krakozyabry, http://hostingkartinok.com/show-image.php?id=34e0c4852c5afbef5344ccfdeb0feadb and on the local hosting and the host everywhere in the tables is utf-8_general_ci, the pages of the site are all utf-8, but I see one difference - on my local host I climbed into Apache in httpd.conf and changed the default charset to utf 8 and here it was hosting and do not even know what it costs - maybe this is the case?
lowersupports multibyte encodings, but the default is latin1. Since this does not work for you, it means that something is wrong with the encoding when connecting (it may be that the table doesn’t indicate what is needed, but I’m not sure here). Try instead of this query to write, for example,"SELECT lower('".$sear."') AS my_word, lower(name) AS db_word FROM articles LIMIT 1"and look where it is broken. When connecting, you must specifySET NAMES 'utf8'and create tables withDEFAULT CHARSET=utf8- BOPOH