Funções
scalar

Scalar

Retorna a primeira coluna de uma única linha.

Promise

local firstName = MySQL.scalar.await('SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1', {
    identifier
})
 
print(firstName)

Aliases

  • MySQL.Sync.fetchScalar
  • exports.ghmattimysql.scalar
  • exports.oxmysql.scalar_async

Callback

MySQL.scalar('SELECT `firstname` FROM `users` WHERE `identifier` = ? LIMIT 1', {
    identifier
}, function(firstName)
    print(firstName)
end)

Aliases

  • MySQL.Async.fetchScalar
  • exports.ghmattimysql.scalar
  • exports.oxmysql.scalar