umstellung auf sym files und datenbank im fraunhofer

This commit is contained in:
Philipp Rauch 2014-01-15 18:02:59 +01:00
parent 0c9a1d2f2c
commit 580a93d620
7 changed files with 89 additions and 52 deletions

View file

@ -6,6 +6,11 @@ Created on 26.11.2013
from MySQLdb import connect
def setup(conf):
'''
establishes a connection to the database and returns a cursor
@return: cursor to the database
'''
connection = connect(host = conf['mySQL_server'],
user = conf['mySQL_user'],
passwd = conf['mySQL_pass'],
@ -15,7 +20,11 @@ def setup(conf):
return cursor
def loop(cursor, item):
sql_values = 'SELECT * FROM %s ORDER BY timestamp DESC LIMIT 1'
'''
'''
sql_values = 'SELECT * FROM %s ORDER BY DateTime DESC LIMIT 1'
sql_collums = 'SHOW COLUMNS FROM %s'
path = item.split('/')