Skip to content

Commit

Permalink
fix(server): proper variable lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
ChatDisabled committed Feb 29, 2024
1 parent 79ca97a commit 5f5ea70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/storage/players.lua
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ local function fetchIsUnique(type, value)
SerialNumber = "JSON_VALUE(metadata, '$.phonedata.SerialNumber')",
}

local count = MySQL.single.await('SELECT COUNT(*) as count FROM players WHERE ' .. typeToColumn[type] .. ' = ?', { value })
return count == 0
local result = MySQL.single.await('SELECT COUNT(*) as count FROM players WHERE ' .. typeToColumn[type] .. ' = ?', { value })
return result.count == 0
end

---@param citizenid string
Expand Down

0 comments on commit 5f5ea70

Please sign in to comment.