This commit is contained in:
hubobel 2025-07-24 15:50:32 +02:00
parent ae67ff31c2
commit c21cb0bdfd
2 changed files with 41 additions and 2 deletions

View file

@ -91,6 +91,9 @@ if 'Samstag,' in datum:
resp = cursor.execute(sql_q)
if resp == 0:
cursor.execute(sql)
connection.commit()
cursor.close()
connection.close()
if 'Mittwoch,' in datum:
sql = "INSERT INTO `mittwoch`(`datum`, `z1`, `z2`, `z3`, `z4`, `z5`, `z6`, `sz`, `super6`, `spiel77`) VALUES" \

View file

@ -193,21 +193,57 @@ def SQLfreitag(data):
resp = cursor.execute(sql_q)
if resp == 0:
cursor.execute(sql)
print(resp)
connection.commit()
cursor.close()
connection.close()
def SQLsamstag(data):
connection = pymysql.connect(db="hubobel",
user="hubobel",
passwd="polier2003",
host='10.0.1.123', charset='utf8')
cursor = connection.cursor()
sql = "INSERT INTO `samstag`(`datum`, `z1`, `z2`, `z3`, `z4`, `z5`, `z6`, `sz`, `super6`, `spiel77`) VALUES" \
" ('" + str(data['Datum']) + "','" + str(data['Z1']) + "','" + str(data['Z2']) + "','" + str(data['Z3']) + \
"','" + str(data['Z4']) + "','" + str(data['Z5']) + "','" + str(data['Z6']) + "','" + str(data['Superzahl']) + \
"','" + str(data['Super6']) + "','" + str(data['Spiel77']) + "')"
sql_q = "SELECT * FROM samstag WHERE datum like '%" + data['Datum'] + "%'"
resp = cursor.execute(sql_q)
if resp == 0:
cursor.execute(sql)
connection.commit()
cursor.close()
connection.close()
def SQLmittwoch(data):
connection = pymysql.connect(db="hubobel",
user="hubobel",
passwd="polier2003",
host='10.0.1.123', charset='utf8')
cursor = connection.cursor()
sql = "INSERT INTO `mittwoch`(`datum`, `z1`, `z2`, `z3`, `z4`, `z5`, `z6`, `sz`, `super6`, `spiel77`) VALUES" \
" ('" + str(data['Datum']) + "','" + str(data['Z1']) + "','" + str(data['Z2']) + "','" + str(data['Z3']) + \
"','" + str(data['Z4']) + "','" + str(data['Z5']) + "','" + str(data['Z6']) + "','" + str(data['Superzahl']) + \
"','" + str(data['Super6']) + "','" + str(data['Spiel77']) + "')"
sql_q = "SELECT * FROM samstag WHERE datum like '%" + data['Datum'] + "%'"
resp = cursor.execute(sql_q)
if resp == 0:
cursor.execute(sql)
connection.commit()
cursor.close()
connection.close()
wochentag = datetime.today().weekday()
wochentag = 1
wochentag = 2
if wochentag == 2:
Zahl = Normalziehung(582)
SQLnorm(Zahl)
SQLmittwoch(Zahl)
notify_telegram(str(Zahl))
elif wochentag == 5:
Zahl = Normalziehung(581)
SQLnorm(Zahl)
SQLsamstag(Zahl)
notify_telegram(str(Zahl))
elif wochentag == 1:
Zahl = Euro()