This commit is contained in:
marcus 2022-03-17 13:36:16 +01:00
parent 5678c31efb
commit bc6134fdbb
3 changed files with 9 additions and 4 deletions

View File

@ -2,11 +2,12 @@
import mysql.connector
def db_connection(user, password, host):
connection = None
connection = ''
try:
connection = mysql.connector.connect(user, password, host)
connection = mysql.connector.connect(user=user, password=password, host=host)
except mysql.connector.Error as err:
print('Something went wrong', err)
return connection.cursor()

View File

@ -5,6 +5,7 @@
import config
import database_connection
def menue():
# TODO Menü erstellen
return
@ -12,3 +13,6 @@ def menue():
def main():
database_connection.db_connection(config.user, config.password, config.host)
main()

0
questions_awnsers.json Normal file
View File