Ausgabe der neuen DB Einträge
This commit is contained in:
parent
954dee5e9e
commit
ce9d5e73c1
1 changed files with 5 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ except:
|
||||||
sql = "SELECT * FROM Filosofie ORDER BY Nr DESC"
|
sql = "SELECT * FROM Filosofie ORDER BY Nr DESC"
|
||||||
resp = cursor.execute(sql)
|
resp = cursor.execute(sql)
|
||||||
resp3=resp
|
resp3=resp
|
||||||
|
db=[]
|
||||||
#print(resp)
|
#print(resp)
|
||||||
ergebniss=''
|
ergebniss=''
|
||||||
requests.packages.urllib3.disable_warnings()
|
requests.packages.urllib3.disable_warnings()
|
||||||
|
|
@ -41,6 +42,7 @@ while start <= anzahl:
|
||||||
if resp == 0:
|
if resp == 0:
|
||||||
try:
|
try:
|
||||||
resp = cursor.execute(sql)
|
resp = cursor.execute(sql)
|
||||||
|
db.append(filosophie)
|
||||||
except:
|
except:
|
||||||
print('Es gab ein Problem beim Schreiben des facts in die DB')
|
print('Es gab ein Problem beim Schreiben des facts in die DB')
|
||||||
except:
|
except:
|
||||||
|
|
@ -50,5 +52,8 @@ while start <= anzahl:
|
||||||
sql = "SELECT * FROM Filosofie ORDER BY Nr DESC"
|
sql = "SELECT * FROM Filosofie ORDER BY Nr DESC"
|
||||||
resp2 = cursor.execute(sql)
|
resp2 = cursor.execute(sql)
|
||||||
print('Es wurden ', int(resp2)-int(resp3), ' neue Filosofien der DB hinzugefügt.')
|
print('Es wurden ', int(resp2)-int(resp3), ' neue Filosofien der DB hinzugefügt.')
|
||||||
|
if len(db)>0:
|
||||||
|
for i in db:
|
||||||
|
print(i)
|
||||||
cursor.close()
|
cursor.close()
|
||||||
connection.close()
|
connection.close()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue