Change GUI view and usability

This commit is contained in:
Sergey Kalinin
2017-03-17 17:17:17 +03:00
parent 76712014cd
commit e8eca97b6b
4 changed files with 82 additions and 8 deletions

3
dm.py
View File

@@ -9,7 +9,6 @@ host='kis',
charset='utf8')
c = conn.cursor()
def createTables(tbl_list):
global tbl_descr_list, tbl_struct_list
i = 0
@@ -59,6 +58,7 @@ def createTables(tbl_list):
i = i + 1
tbl_descr_list.append(one_Table_descr)
tbl_struct_list.append(one_Table_struct)
print(qwery_create)
c.execute(qwery_create)
return tbl_names_list
@@ -98,6 +98,7 @@ def selectData(tbl):
subqwery = "(SELECT CONCAT(" + field_replace + ") FROM " + subqwery +" WHERE "+ table1 + "." + field1 +"="+ tbl +"."+ field +") AS " + field
qwery = qwery.replace(field, subqwery)
qwery = qwery.rstrip(',') + " FROM " + tbl + " LIMIT 10000"
print(qwery)
c.execute(qwery)
return c.fetchall()