Skip to content

Commit

Permalink
fixed sql syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
swkeep committed Nov 9, 2022
1 parent b56d5ec commit 8d1df9c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,9 @@ end)
CreateCallback('keep-sharedgarages:server:GET:garage_categories', function(source, cb, current_garage)
local function count_guest_vehicles(res)
local q = ''
local qq = 'SELECT COUNT(id_keep_garage_categories) FROM keep_garage WHERE garage = ? AND '
local qq = 'SELECT COUNT(id_keep_garage_categories) FROM keep_garage WHERE garage = ? '
for key, c in ipairs(res) do
local string = 'id_keep_garage_categories != ' .. c.id
local string = 'AND id_keep_garage_categories != ' .. c.id
if key > 1 then
string = ' AND id_keep_garage_categories != ' .. c.id
end
Expand Down Expand Up @@ -570,9 +570,9 @@ CreateCallback('keep-sharedgarages:server:GET:vehicles_on_category', function(so

local function get_guest_vehicles(res)
local q = ''
local qq = 'SELECT * FROM keep_garage WHERE garage = ? AND '
local qq = 'SELECT * FROM keep_garage WHERE garage = ? '
for key, c in ipairs(res) do
local string = 'id_keep_garage_categories != ' .. c.id
local string = 'AND id_keep_garage_categories != ' .. c.id
if key > 1 then
string = ' AND id_keep_garage_categories != ' .. c.id
end
Expand Down

0 comments on commit 8d1df9c

Please sign in to comment.