Code cleaning, and added some function for add record dialog.
This commit is contained in:
4
dm.py
4
dm.py
@@ -135,7 +135,7 @@ def createTables(tbl_list):
|
||||
tbl_descr_list.append(one_Table_descr)
|
||||
tbl_struct_list.append(one_Table_struct)
|
||||
print(qwery_create)
|
||||
c.execute(qwery_create)
|
||||
#c.execute(qwery_create)
|
||||
return tbl_names_list
|
||||
|
||||
def initDBstructure():
|
||||
@@ -176,7 +176,7 @@ def selectData(tbl):
|
||||
field_replace = field_replace.replace(",", ",' ',")
|
||||
subqwery = "(SELECT CONCAT(" + field_replace + ") FROM " + subqwery + " WHERE " + table1 + "." + field1 + "=" + tbl + "." + field + ") AS " + field
|
||||
elif db_type == "sqlite":
|
||||
field_replace = field_replace.replace(",", " || ")
|
||||
field_replace = field_replace.replace(",", " || ' ' ||")
|
||||
subqwery = "(SELECT (" + field_replace + ") FROM " + subqwery +" WHERE "+ table1 + "." + field1 +"="+ tbl +"."+ field +") AS " + field
|
||||
qwery = qwery.replace(field, subqwery)
|
||||
qwery = qwery.rstrip(',') + " FROM " + tbl + " LIMIT 10000"
|
||||
|
Reference in New Issue
Block a user