mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 16:23:21 +00:00
better sql performance
no longer selecting every column
This commit is contained in:
+7
-1
@@ -193,8 +193,14 @@ ESX.RegisterServerCallback('esx_society:getEmployees', function(source, cb, soci
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
local query = "SELECT identifier, job_grade FROM `users` WHERE `job`=@job ORDER BY job_grade DESC"
|
||||
|
||||
MySQL.Async.fetchAll('SELECT * FROM `users` WHERE `job`=@job ORDER BY job_grade DESC', {
|
||||
if Config.EnableESXIdentity then
|
||||
query = "SELECT identifier, job_grade, firstname, lastname FROM `users` WHERE `job`=@job ORDER BY job_grade DESC"
|
||||
end
|
||||
|
||||
MySQL.Async.fetchAll(query, {
|
||||
['@job'] = society
|
||||
}, function(result)
|
||||
for k, row in pairs(result) do
|
||||
|
||||
Reference in New Issue
Block a user