diff --git a/DataStore.py b/DataStore.py index 2d38ecc..bbb7b69 100644 --- a/DataStore.py +++ b/DataStore.py @@ -39,3 +39,16 @@ CREATE TABLE hours ( conn.commit() c.close() conn.close() + + def getProjects(self): + c = self.conn.cursor() + c.execute(''' +SELECT id, name +FROM projects +''') + projects = {} + for row in c: + projects[row[0]] = row[1] + c.close() + self.conn.commit() + return projects