writes to database

This commit is contained in:
Mikayla Dobson
2022-04-06 13:11:54 -05:00
parent bb2807e5fe
commit d49aa5da5b
2 changed files with 36 additions and 6 deletions

View File

@@ -25,8 +25,9 @@ cur.executemany("INSERT INTO TIMESTAMPS VALUES (?, ?, ?, ?, ?)", timestamp_list)
# 3) Calculate total hours for the week
# 4) Calculate complete sum of hours
def create_new_stamp():
current_time = ''
def create_new_stamp(timestamp, name, purpose):
to_insert = (999, timestamp, 'null', name, purpose)
cur.execute("INSERT INTO TIMESTAMPS VALUES (?, ?, ?, ?, ?)", to_insert)
def get_all_stamps():
return cur.execute("SELECT * FROM TIMESTAMPS;")