About XAMPP MySQL character encoding and compiler encoding mismatch problem

Source: Internet
Author: User

Today, when querying database character fields in PHP, the syntax is exactly the same, but the query is not the result, and in the command line, the same statement can achieve the desired effect. After a lot of understanding, we found that the character encoding does not match the reason. Here, I would like to share with you the process of solving the problem:

First of all, I use XAMPP this software to install, so it may be different from other software. Then, to solve this problem is very simple, we just need to open the phpadmin, and then you want to query the database or table collation to the desired character encoding (such as: GB2312_CHINESE_CI,UTF8_CHINESE_CI, etc.). At the end of the query you will find that the previous problem has been resolved, yes, it is so simple

About XAMPP MySQL character encoding and compiler encoding mismatch problem

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.