diff options
author | Lukas Metzger | 2020-05-22 18:43:17 +0200 |
---|---|---|
committer | Lukas Metzger | 2020-05-22 18:43:17 +0200 |
commit | fcc360620163d005986bb20e6792c7d8f71e7a3a (patch) | |
tree | 89b10d6078447ec570e05423088287b817609e5d /db.py | |
download | bwlp-statistics-fcc360620163d005986bb20e6792c7d8f71e7a3a.tar.gz bwlp-statistics-fcc360620163d005986bb20e6792c7d8f71e7a3a.tar.xz bwlp-statistics-fcc360620163d005986bb20e6792c7d8f71e7a3a.zip |
First version
Diffstat (limited to 'db.py')
-rw-r--r-- | db.py | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -0,0 +1,16 @@ +#!/usr/bin/env python3 + +import pymysql + +def getConnection(): + db = pymysql.connect('mysql.oebsrv.int.intranet', 'bwlehrpool', 'weav3Nu8ShaifaePh6aiqu6aetei7e', 'bwlehrpool', cursorclass=pymysql.cursors.DictCursor) + return db + +def closeConnection(db): + db.commit() + db.close() + + + + + |