In the basic information of students in the database, the student name field is a json-packed string, for example, {& quot; stu_name & quot;: & quot; u5f20u4e09 & quot ;}, it indicates that the student name is Michael. I want to perform a fuzzy query on the student name in the php program. when I enter & quot; Zhang & quot;, the background program uses json_encode to get the unicode u5f20, then, the fuzzy query condition in the database is like & #39; % u5f20 % & #39;. at this time, the data of Michael can be returned, but when I enter & quot; when Zhang San & quot; is two words, like phpsql fuzzy query
In the basic information of students in the database, the student name field is a json-packed string, for example, {"stu_name": "\ u5f20 \ u4e09"}, indicating that the student name is John. I want to perform a fuzzy query on the student name in the php program. when I enter "Zhang", the background program uses json_encode to get the unicode \ u5f20, then, the fuzzy query condition in the database is like '% \ u5f20 %'. at this time, the data of Michael can be returned, but when I enter the word "Michael, like '% \ u5f20 \ u4e09 %', it cannot be returned. After several attempts, I found that only one Chinese character can be found between two % characters. In addition, insert a % between Chinese characters and like '% \ u5f20 % \ u4e09 %. I used var_dump ('\ u5f20 \ u4e09') to output 12 characters. There should be no other characters between Chinese characters. what is the problem? Please advise.