timekeeper

[Abandoned unfinished] CGI web application in C for time tracking. (My first, just a learning project)
Log | Files | Refs | README

commit d8296f4ed1b62c089ec03fed5f2c68c5e7bbca3b
parent 069b25c779d3e56e94957764821d877379bc217a
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Tue, 19 Mar 2024 19:52:44 -0700

Fix time retrieval statements

Results were unordered. Also StmtGetTimes was an invalid statement.

Diffstat:
Mstmt.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/stmt.c b/stmt.c @@ -70,11 +70,11 @@ struct sqlbox_pstmt pstmts[] = { }, [StmtGetTimes] = { .stmt = "SELECT period, start, startbreak, endbreak, end FROM times\n" - " WHERE userid IS" + " WHERE userid IS ? ORDER BY entry" }, [StmtGetTimePeriod] = { .stmt = "SELECT period, start, startbreak, endbreak, end FROM times\n" - " WHERE userid IS ? AND period IS ?" + " WHERE userid IS ? AND period IS ? ORDER BY entry" }, [StmtBreakTime] = { .stmt = "UPDATE times SET period =\n"