Skip to content

Commit d8c94de

Browse files
authored
Update mysql.py
1 parent f57073e commit d8c94de

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mysql.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
cur1.execute("SELECT * FROM information_schema.tables WHERE table_schema ='rastey';")
1111
cur1.execute("SELECT * from information_schema.tables where table_schema = 'rastey'")
1212
cur.execute("SELECT * from vendor_users_log")
13-
13+
columns = cur.description
14+
results = [{columns[index][0]: column for index, column in enumerate(value)} for value in cur.fetchall()]
15+
cur.close()
1416

1517

1618

0 commit comments

Comments
 (0)