Compare commits
2 Commits
02388c80de
...
1214405b27
| Author | SHA1 | Date | |
|---|---|---|---|
| 1214405b27 | |||
| ec9fb118f1 |
@@ -46,12 +46,13 @@ INSERT INTO filmgenres(genre, beschreibung)
|
||||
cursor = con_db.cursor()
|
||||
while True:
|
||||
##Abfrage Name
|
||||
|
||||
name = input("Name des Films: ")
|
||||
if not name:
|
||||
break
|
||||
##Abfrage Genre
|
||||
while True:
|
||||
|
||||
while True:
|
||||
movie_genre = input("Genre: ")
|
||||
sql = """Select * from filmgenres where genre = '{genre}'""".format(genre=movie_genre)
|
||||
cursor.execute(sql)
|
||||
@@ -65,7 +66,13 @@ INSERT INTO filmgenres(genre, beschreibung)
|
||||
self.ausgabe_abfrage(sql_abfrage="""Select genre from filmgenres""")
|
||||
|
||||
#Abfrage Jahr
|
||||
movie_year = input("Jahr: ")
|
||||
while True:
|
||||
movie_year = input("Jahr: ")
|
||||
if len(str(movie_year)) == 4 and movie_year.isdigit() is True:
|
||||
break
|
||||
else:
|
||||
print("Das Jahr muss 4 Zeichen haben und aus Zahlen bestehen.")
|
||||
|
||||
#Abfrage Format
|
||||
while True:
|
||||
format = input("Format :")
|
||||
@@ -74,7 +81,7 @@ INSERT INTO filmgenres(genre, beschreibung)
|
||||
else:
|
||||
print("blue-ray", "dvd", "platte", "sd")
|
||||
#Abfrage Meinung
|
||||
per_info = input("Meinung : ")
|
||||
per_info = input("Meinung : ").lower()
|
||||
|
||||
sql = """Select * from movies WHERE name = '{name}';""".format(name=name)
|
||||
cursor.execute(sql)
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user