[MySQL] How i can get identifier new ESX

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)
1 Like

Thanks.
if I could ask you would write to me how to make a name from the database in firstname

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
       }