MRI Qbox BrasilMRI Qbox

update

Retorna o número de linhas afetadas pela consulta.

Promise

local affectedRows = MySQL.update.await('UPDATE users SET firstname = ? WHERE identifier = ?', {
    newName, identifier
})

print(affectedRows)
const affectedRows = await MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ?', [
  newName, identifier
])

console.log(affectedRows)

Aliases

  • MySQL.Sync.execute
  • exports.ghmattimysql.executeSync
  • exports.oxmysql.update_async

Callback

MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ?', {
    newName, identifier
}, function(affectedRows)
    print(affectedRows)
end)
MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ?', [
  newName, identifier
], (affectedRows) => {
  console.log(affectedRows)
})

Aliases

  • MySQL.Async.execute
  • exports.ghmattimysql.execute
  • exports.oxmysql.update

On this page

Usamos cookies para anúncios e métricas. Veja a política de privacidade.