Ask the master about the problem of converting UTF8 encoding from MYSQL GBK
实力单身典范
实力单身典范 2019-07-16 17:59:56
0
0
915

Requirements:

A remote table userinfo_remote, database encoding gbk, proofreading set is gbk_chinese_ci, fields (uid, username, password, email,... others) where username is the only index

It is necessary to take certain fields (uid, username, password) from the remote table, and then write them into the local table userinfo_local. The local table encoding is utf8, and the proofing set is utf8_general_ci, in which username is the only index.

Question:

In the remote database, it was found that there are users such as the following users

uid=12, username=coco,

uid=234, username=CǒCǒ,

in When writing to the local database, a duplicate username error is reported, such errors are reported, and there are others.

Solution: Without changing the proofing set (because userinfo_local will be used as a new user table later in the project) There is a user registration function, but I hope to still maintain the case-insensitive requirement), how to transfer the data of the remote table to the new table~~~~? I beg the master

实力单身典范
实力单身典范

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!