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

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

WBOY
Release: 2016-06-13 12:34:50
Original
984 people have browsed it

关于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


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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template