Changed docker data volume to project specific name

This commit is contained in:
Torsten 2022-04-09 10:00:04 +02:00
parent 2f29555240
commit 5ae3ac82e1
6 changed files with 515 additions and 3 deletions

29
tools/demo_query.py Normal file
View file

@ -0,0 +1,29 @@
# This script needs mysql driver:
# pip3 install mysql
import MySQLdb
db = MySQLdb.connect(host ="hoschis-tippspiel.de", # your host, usually localhost
user ="d0274241", # your username
passwd="superpfosten!", # your password
db ="d0274241") # name of the data base
# you must create a Cursor object. It will let
# you execute all the queries you need
cur = db.cursor()
# Use all the SQL you like
cur.execute("SELECT * FROM seasons")
# Column namnes
arr=[]
for i in range(0,len(cur.description)):
arr.append(cur.description[i][0])
print(";".join(arr))
for row in cur.fetchall():
print (row)
print("---")
db.close()