How i can get identifier? i try this:
local identifier = GetPlayerIdentifiers(source) MySQL.Async.fetchAll(“SELECT * FROM users WHERE identifier = @identifier”, {
[’@user_id’] = identifier,
}, function (result)
but doesn’t work
How i can get identifier? i try this:
local identifier = GetPlayerIdentifiers(source) MySQL.Async.fetchAll(“SELECT * FROM users WHERE identifier = @identifier”, {
[’@user_id’] = identifier,
}, function (result)
but doesn’t work
MySQL.Async.fetchScalar('SELECT 1 FROM users WHERE identifier = @identifier', {
['@identifier'] = identifier
}, function(result)
try this
or
MySQL.Async.fetchScalar('SELECT 1 FROM users WHERE identifier = @identifier', {
['@identifier'] = identifier
}, function(result)
if result then
loadESXPlayer(identifier, playerId)
I think it’s that
MySQL.Async.fetchAll('SELECT identifier, firstname FROM `users` WHERE `identifier` = @identifier', {
['@identifier'] = xPlayer.identifier
}, function(result)
if result[1].firstname ~= nil then
local data = {
firstname = result[1].firstname
}