Home  >  Article  >  Backend Development  >  mysql有的表中字段不支持中文

mysql有的表中字段不支持中文

WBOY
WBOYOriginal
2016-06-23 13:50:52964browse



如上图,我直接在mysql的某张表中修改字段,输入的中文变成了??,但是同样在该数据库中另外的表里,用中文修改某些字段却是正常的。

求教大神,问题出在哪边啊?


回复讨论(解决方案)

字符集的问题

字符集的问题



-------------------------------------------------------------------------



这是数据库里的字符集,php目前是utf-8的,我现在应该怎么改?

连接数据库后执行

mysql_query('set names utf8');

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