python查询MySQL结果输出dict/json

from mysql import connector cnx = connector.connect() cur = cnx.cursor(dictionary=True) sql = '''select 1 as one,2 as tow union select 11 as one,22 as tow union select "011" as one,"022" as tow; '''
相关文章
相关标签/搜索