Pruefungskatalog/database.py
2022-03-18 09:32:08 +01:00

31 lines
539 B
Python

# TODO: Datenbank Klasse (CRUD)
import mysql.connector
def create(db_cursor, name):
query = f'CREATE DATABASE {name}'
try:
db_cursor.execute(query)
except mysql.connector.Error as err:
print('Something went wrong', err)
def add(db_cursor):
# TODO Frage / Antwort hinzufügen
return
def read(db_cursor):
# TODO Frage / Antwort auslesen
return
def update(db_cursor):
# TODO Frage / Antwort Aktualisieren
return
def del_(db_cursor):
# TODO Frage / Antwort löschen
return