Fix query keyword conflict by using alias

pull/1/head
Flashfyre 2023-12-28 21:13:21 -05:00
parent f5d9cc6760
commit b4be49bf80
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ func GetUsernameFromToken(token []byte) (string, error) {
func GetAccountKeySaltFromUsername(username string) ([]byte, []byte, error) { func GetAccountKeySaltFromUsername(username string) ([]byte, []byte, error) {
var key, salt []byte 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 { if err != nil {
return nil, nil, err return nil, nil, err
} }