def dbInsert(paras, id, file): label = getLabel(file) paras['op'] = "insertElement" paras['id'] = id paras['label'] = label paras['path'] = file mySql.main(paras)
def createID(paras): id_list = [] for i in range(10000): id_list.append(i) paras['op'] = "showItems" paras['internal'] = True data = mySql.main(paras) for line in data: num = int(line[0].split("_")[1]) id_list.remove(num) return paras['prefix'] + "_" + str(id_list.pop())