python连接mysql查询数据返回字典格式
importMySQLdbimportMySQLdb.cursorsconn = MySQLdb.connec('localhost','root','test456','db_test',charset='utf8',cursorclass = MySQLdb.cursors.DictCursor)转载于:https://blog.51cto.com...
·
import MySQLdb
import MySQLdb.cursors
conn = MySQLdb.connec('localhost','root','test456','db_test',charset='utf8',cursorclass = MySQLdb.cursors.DictCursor)
import MySQLdb.cursors
conn = MySQLdb.connec('localhost','root','test456','db_test',charset='utf8',cursorclass = MySQLdb.cursors.DictCursor)
转载于:https://blog.51cto.com/linuxshow/779521
更多推荐
所有评论(0)