I am in the database Student basic information, the Student Name field is a JSON wrapped string, such as {"Stu_name": "\u5f20\u4e09"}, indicating that the student name is Zhang San. I am in the PHP program to do the student name fuzzy query, when I enter "Zhang", the background program with Json_encode to get the Unicode encoding \u5f20, and then the database fuzzy query condition is like '%\u5f20% ', this time, can return Zhang San that data, But when I input "Zhang San" two words, like '%\u5f20\u4e09% ', unexpectedly can not return. Then I tried several times, found that two percent of the middle as long as it is a Chinese character can be traced, more than one can not. In addition, a%,like '%\u5f20%\u4e09% ' is inserted between Chinese characters so that it can be queried. I use Var_dump (' \u5f20\u4e09 ') output display is 12 characters, Chinese characters should have no other characters, how is it? Ask for expert guidance.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.