Home  >  Article  >  Backend Development  >  关于MYSQL数据封存用utf8编码保存,有的数据搜索不到

关于MYSQL数据封存用utf8编码保存,有的数据搜索不到

WBOY
WBOYOriginal
2016-06-13 11:38:32703browse

关于MYSQL数据保存用utf8编码保存,有的数据搜索不到
我的网页用的是utf8编码,所以在保存数据时加入了mysql_query("set names 'utf-8'"); 

mysql整理成了utf8_general_ci

而我在搜索数据时
$so="爱你一万年";
movie` WHERE `a0` LIKE '%$so%' AND `a2` LIKE '%$so%' LIMIT 0 , 1200


这样搜索中文变量时,有的中文传递过来的变量,根本搜索不出来。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn