|
@ -35,6 +35,7 @@ def execSql(request): |
|
|
user=username, |
|
|
user=username, |
|
|
passwd=password, |
|
|
passwd=password, |
|
|
db=database, |
|
|
db=database, |
|
|
|
|
|
charset='utf8' |
|
|
) |
|
|
) |
|
|
db.query(sql) |
|
|
db.query(sql) |
|
|
data = db.store_result().fetch_row(maxrows=0, how=2) |
|
|
data = db.store_result().fetch_row(maxrows=0, how=2) |
|
@ -49,7 +50,6 @@ def execSql(request): |
|
|
else: |
|
|
else: |
|
|
column = key |
|
|
column = key |
|
|
if isinstance(row[key], bytes): |
|
|
if isinstance(row[key], bytes): |
|
|
print(row[key], key) |
|
|
|
|
|
json_data[index][column] = row[key].decode('UTF-8', 'ignore') |
|
|
json_data[index][column] = row[key].decode('UTF-8', 'ignore') |
|
|
else: |
|
|
else: |
|
|
json_data[index][column] = row[key] |
|
|
json_data[index][column] = row[key] |
|
|