This commit is contained in:
marcus 2022-03-18 09:29:41 +01:00
parent ef7d93b244
commit 8b547bd786

View File

@ -1,20 +1,20 @@
# TODO: Datenbank Klasse (CRUD)
import mysqlx
import mysql.connector
def create_database(db_cursor):
# TODO Datenbank erstellen
return
def create_table(db_cursor, database_name):
def create_database(db_cursor, database_name):
query = f'CREATE DATABASE {database_name}'
try:
db_cursor.execute(query)
except mysqlx.Error as err:
except mysql.connector.Error as err:
print('Something went wrong', err)
def create_table(db_cursor):
# TODO Frage / Antwort Tabellen erstellen
return
def add(db_cursor):
# TODO Frage / Antwort hinzufügen
return