MYSQL data is stored in UTF-8 encoding, and some data cannot be searched.
Source: Internet
Author: User
MYSQL data is saved using utf8 encoding. some data cannot be found on my webpage using utf8 encoding. Therefore, mysql_query ("set & nbsp; names & nbsp; 'utf-8' "); & nbsp; mysql is compiled into utf8_general_ci, and $ so =" 10 thousand "when I search for data; apsaradb for MYSQL is saved using utf8 encoding, some data cannot be searched
My webpage uses UTF-8 encoding, so mysql_query ("set names 'utf-8'") is added when saving data '");
Mysql is compiled into utf8_general_ci
While searching for data
$ So = "love you for 10 thousand years ";
Movie 'where 'a0 'LIKE' % $ so % 'AND 'A2' LIKE '% $ so %' LIMIT 0, 1200
In this way, some variables passed by Chinese characters cannot be searched.
------ Solution --------------------
Set names utf8 added during search?
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.