This commit is contained in:
parent
5678c31efb
commit
bc6134fdbb
|
@ -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)
|
||||
print('Something went wrong', err)
|
||||
return connection.cursor()
|
||||
|
|
4
main.py
4
main.py
|
@ -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
0
questions_awnsers.json
Normal file
Loading…
Reference in New Issue
Block a user