michaelhodgejr / esx_impound

Adds impound lots to FiveM servers via the ESX Framework
13 stars 12 forks source link

upgrade the server.lua line.90 to #4

Closed shyricaus closed 6 years ago

shyricaus commented 6 years ago

-- Delete vehicle from garage MySQL.Async.execute("DELETE FROM owned_vehicles WHERE plate=@plate LIMIT 1", {['@plate'] = vehicle.plate})

shyricaus commented 6 years ago

but now the CPU usage is perfect

michaelhodgejr commented 6 years ago

@shyricaus That delete statement is using the ID column of the owned vehicles table which is a primary key. There is nothing wrong with using the ID column and in fact it is encouraged to do so. I'm glad your CPU usage problem is fixed though!