From b4be49bf80907154fc409abcee412a3e4fa69f6f Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Thu, 28 Dec 2023 21:13:21 -0500 Subject: [PATCH] Fix query keyword conflict by using alias --- db/account.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/account.go b/db/account.go index 73f506c..69ac3f3 100644 --- a/db/account.go +++ b/db/account.go @@ -40,7 +40,7 @@ func GetUsernameFromToken(token []byte) (string, error) { func GetAccountKeySaltFromUsername(username string) ([]byte, []byte, error) { var key, salt []byte - err := handle.QueryRow("SELECT [key], salt FROM accounts WHERE username = ?", username).Scan(&key, &salt) + err := handle.QueryRow("SELECT a.key, a.salt FROM accounts a WHERE a.username = ?", username).Scan(&key, &salt) if err != nil { return nil, nil, err }