AI编程社区 python连接mysql查询数据返回字典格式

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

importMySQLdbimportMySQLdb.cursorsconn = MySQLdb.connec('localhost','root','test456','db_test',charset='utf8',cursorclass = MySQLdb.cursors.DictCursor)转载于:https://blog.51cto.com...

?Briella  ·  2012-02-14 14:34:58 发布
import MySQLdb
import MySQLdb.cursors 
conn = MySQLdb.connec('localhost','root','test456','db_test',charset='utf8',cursorclass = MySQLdb.cursors.DictCursor) 

转载于:https://blog.51cto.com/linuxshow/779521

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐

  • 浏览量 511
  • 收藏 0
  • 0

所有评论(0)

查看更多评论 
已为社区贡献1条内容