aboutsummaryrefslogtreecommitdiff
path: root/db.c
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2020-06-27 22:16:53 +0200
committerTom Smeding <tom.smeding@gmail.com>2020-06-27 22:26:59 +0200
commit5704a49c7908cef401d23879f32013f90d2e7878 (patch)
treea87a5c5637701ebf575a86825b15f010801784c9 /db.c
parente86deffd9c387f0912eb392cf23cb08aa3ea4c1e (diff)
server: Ensure db queries are all indexed
Diffstat (limited to 'db.c')
-rw-r--r--db.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/db.c b/db.c
index 413953b..0dd16e8 100644
--- a/db.c
+++ b/db.c
@@ -249,7 +249,7 @@ i64 db_create_user(const char *name,const char *pass){
bool db_set_username(i64 userid, const char *name) {
sqlite3_stmt *stmt;
- SQLITE(prepare_v2, database, "update USERS set name = ? where id = ?", -1, &stmt, NULL);
+ SQLITE(prepare_v2, database, "update Users set name = ? where id = ?", -1, &stmt, NULL);
SQLITE(bind_text, stmt, 1, name, -1, SQLITE_STATIC);
SQLITE(bind_int64, stmt, 2, userid);
bool success = sqlite3_step(stmt) == SQLITE_DONE;
@@ -262,7 +262,7 @@ bool db_set_pass(i64 userid, const char *pass) {
if (passhash.length == -1) return false;
sqlite3_stmt *stmt;
- SQLITE(prepare_v2, database, "update USERS set passhash = ? where id = ?", -1, &stmt, NULL);
+ SQLITE(prepare_v2, database, "update Users set passhash = ? where id = ?", -1, &stmt, NULL);
SQLITE(bind_text, stmt, 1, passhash.str, passhash.length, SQLITE_STATIC);
SQLITE(bind_int64, stmt, 2, userid);
bool success = sqlite3_step(stmt) == SQLITE_DONE;