Private
Public Access
1
0

C2 upload tested and working

This commit is contained in:
Sander Roosendaal
2020-03-10 11:54:40 +01:00
parent 3d6f8e89cb
commit f2635651aa
3 changed files with 23 additions and 3 deletions

View File

@@ -741,6 +741,25 @@ def getsmallrowdata_db(columns,ids=[],debug=False):
return df
def update_workout_field_sql(workoutid,fieldname,value,debug=False):
if debug:
engine = create_engine(database_url_debug, echo=False)
else:
engine = create_engine(database_url, echo=False)
table = 'rowers_workout'
query = "UPDATE %s SET %s = %s WHERE `id` = %s;" % (table,fieldname,value,workoutid)
with engine.connect() as conn, conn.begin():
result = conn.execute(query)
conn.close()
engine.dispose()
return 1
def update_c2id_sql(id,c2id):
engine = create_engine(database_url, echo=False)
table = 'rowers_workout'