查询中文按照拼音排序
2010-03-10 10:07
323 查看
查询中文按照拼音排序
select id,name from product_ringtone_album order by CONVERT( name USING gbk ) COLLATE gbk_chinese_ci ASC
python连接MySql ,先安装python2Mysql库
import MySQLdb
conn = MySQLdb.connect (host = "localhost",
user = "testuser",
passwd = "testpass",
db = "test")
cursor = conn.cursor ()
cursor.execute ("SELECT VERSION()")
row = cursor.fetchone ()
print "server version:", row[0]
cursor.close ()
conn.close ()
select id,name from product_ringtone_album order by CONVERT( name USING gbk ) COLLATE gbk_chinese_ci ASC
python连接MySql ,先安装python2Mysql库
import MySQLdb
conn = MySQLdb.connect (host = "localhost",
user = "testuser",
passwd = "testpass",
db = "test")
cursor = conn.cursor ()
cursor.execute ("SELECT VERSION()")
row = cursor.fetchone ()
print "server version:", row[0]
cursor.close ()
conn.close ()
相关文章推荐
- Hibernate 实现Oracle的中文汉字按照拼音排序 之延续,通用的查询排序能力。
- java集合某个字段按照中文拼音排序
- mysql 中文字段排序( 按拼音首字母排序) 的查询语句
- 按照拼音对数组中的中文字符串排序的算法
- mysql 中文按照拼音排序
- 如何让数据库排序的时候按照中文的拼音来排序
- mysql 中文字段排序( 按拼音首字母排序) 的查询语句
- ext改变行样式,中文按照拼音排序
- list之按照中文拼音首字母排序
- Java字符串按照中文拼音排序
- 多表查询后按照拼音排序
- java中按照中文拼音排序
- mysql 中文字段排序( 按拼音首字母排序) 的查询语句
- ExtJS中grid按照中文拼音首字母排序、改变行背景、列背景、静态数据分页不再困难
- 中文按照拼音排序的函数 strcoll wcscroll 及 _tcscoll
- 查询结果按中文拼音顺序排序
- mysql 中文字段排序( 按拼音首字母排序) 的查询语句
- mysql 中文字段排序( 按拼音首字母排序) 的查询语句
- mysql中文字段排序( 按拼音首字母排序)的查询语句
- mysql 中文字段排序( 按拼音首字母排序) 的查询语句