您的位置:首页 > 编程语言 > Python开发

python连接mysql查询数据返回字典格式

2012-02-14 14:34 826 查看
import MySQLdb
import MySQLdb.cursors
conn = MySQLdb.connec('localhost','root','test456','db_test',charset='utf8',cursorclass = MySQLdb.cursors.DictCursor) 本文出自 “学海无涯苦作伴” 博客,请务必保留此出处http://linuxshow.blog.51cto.com/1572053/779521
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: