且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在mysql表中插入汉字?

更新时间:2022-10-18 09:50:01

在创建表时使用UTF-8



create table xxx()CHARACTER SET = utf8; / p>

在插入表格时使用UTF-8



set names utf8;插入到xxx(xx,x);


I want to save data in Chinese language in mysql table.

Can anyone tell me what settings I have to do for it in mysql and PHP.

My table will save data in both English and Chinese some column English other Chinese . Is it possible with single table.

Any help will be appreciated.

Use UTF-8 when you create table

create table xxx ()CHARACTER SET = utf8;

Use UTF-8 when you insert to table

set names utf8; insert into xxx (xx,x);