MySQLdb的实现方法是:
conn=MySQLdb.connect(..., cursorclass=MySQLdb.cursors.DictCursor)
或者用MySQLdb.cursors.SSDictCursor。前者数据存储在客户端,后者数据存储在服务器。
推荐:http://www.cnblogs.com/roucheng/p/pythonstring.html
python sqlite中通过字段名获取查询结果
标签:
MySQLdb的实现方法是:
conn=MySQLdb.connect(..., cursorclass=MySQLdb.cursors.DictCursor)
或者用MySQLdb.cursors.SSDictCursor。前者数据存储在客户端,后者数据存储在服务器。
推荐:http://www.cnblogs.com/roucheng/p/pythonstring.html
python sqlite中通过字段名获取查询结果
标签: