diff --git a/play_with_sqllite/main.py b/play_with_sqllite/main.py index e1a7a1f..58c8b17 100644 --- a/play_with_sqllite/main.py +++ b/play_with_sqllite/main.py @@ -70,6 +70,25 @@ def lese_tabellen(): return cursor.fetchall() +def eingabe(): + with sqlite3.connect(script_folder + "/startegie.db") as verbindung: + cursor = verbindung.cursor() + while True: + name = input("Name des Virus: ") + if not name: + break + ort = input("Ort: ") + vorfall = input("Vorfall: ") + sql = """Select * from viren WHERE name = '{name}';""".format(name=name) + cursor.execute(sql) + if cursor.fetchone(): + speicher_aktion(name, ort, vorfall) + else: + print("Virus unbekannt !") + print("Eingabevorgang wurde beendet.") + +def speicher_aktion(): + pass