Skip to content

Commit

Permalink
limit plate existence query to 1 value
Browse files Browse the repository at this point in the history
  • Loading branch information
Manason committed Jun 10, 2024
1 parent d8fcbcb commit 4b7ef51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ end
---@param plate string
---@return boolean
local function doesEntityPlateExist(plate)
local result = MySQL.scalar.await('SELECT 1 FROM player_vehicles WHERE plate = ?', {plate})
local result = MySQL.scalar.await('SELECT 1 FROM player_vehicles WHERE plate = ? LIMIT 1', {plate})
return result ~= nil
end

Expand Down

0 comments on commit 4b7ef51

Please sign in to comment.