There is a Select request.

 SELECT firstname, lastname FROM mdl_groups ... WHERE ... mdl_groups.name='Гр. №123' 

Also, at the end, there is a string expression. The problem is that the query returns 0 lines, due to the fact that Russian characters are used. How can this problem be solved? Tell me please.

    1 answer 1

    It is necessary that:

    1. The connection encoding matched the encoding of the query string. Ie, for example, when connecting, do SET NAMES utf8; and in the source the string will be in UTF-8.
    2. The coding of the column must be correctly specified in the database. Sometimes, due to the curves of the settings, there is some kind of Latin-1, then you need to export the data, change the encoding (in the dump and in the database) and import them back (since ALTER “spoil” them, trying to convert them in good faith).