Sometimes when we read the database output, we may need to sort the data by the Chinese user name. Some new friends have no idea about this. Next we will introduce the implementation method in detail in the small Editor, if you are interested, learn more.
Sometimes when we read the database output, we may need to sort the data by the Chinese user name. Some new friends have no idea about this. Next we will introduce the implementation method in detail in the small Editor, if you are interested, learn more.
Sometimes, when reading the database output, we may need to sort by the Chinese user name. The traditional MySQL query code is as follows:
$ SQL = "SELECT * FROM users"; // traditional Query Method
The MySQL query code sorted by Chinese user name is as follows:
The Code is as follows:
$ SQL = "SELECT * FROM users ORDER BY CONVERT (name USING gbk)"; // used in Chinese