Code: Alles auswählen
def makeNextAuftrag (werte):
ergebnis = getAuftragById (werte)
connection = opendb()
cursor = connection.cursor()
for row in ergebnis:
pass
auftrag = schedaddle.next ((int (row[1]), int (row[2]), int (row[3]),
int (row[4]), int (row[5])),
str (row[6])
)
werte = {
"auftrags_id" : row [0],
"year_next" : auftrag [0],
"month_next" : auftrag [1],
"day_next" : auftrag [2],
"hour_next" : auftrag [3],
"minute_next" : auftrag [4]
}
# errechnete werte zurück in die tabelle schreiben
cursor.execute ("""update auftraege set
year_next=:year_next, month_next=:month_next, day_next=:day_next,
hour_next=:hour_next, minute_next=:minute_next
where auftrags_id=:auftrags_id""", werte )
connection.commit ()