Skip to content

mysql_transaction_execute

imshooter edited this page Dec 1, 2026 · 2 revisions

Run a transaction after the queries sent before it, call a public when it is done, and forget it.

Its steps run in order on one connection between START TRANSACTION and COMMIT. When one fails, the rest are not run, everything is rolled back and OnQueryError is called with that step. Each step gives a result of the cache, which cache_set_result chooses.

native bool:mysql_transaction_execute(
    Transaction:transaction,
    const callback[] = "",
    const format[] = "",
    {Float, _}:...
);

With open.mp names, from the same include:

native bool:MySQL_ExecuteTransaction(
    Transaction:transaction,
    const callback[] = "",
    const format[] = "",
    {Float, _}:...
);

Parameters

Parameter Description
Transaction:transaction The transaction.
const callback[] = "" Public to call, or none.
const format[] = "" Letters of the values the public receives.
{Float, _}:... The values.

Returns

  • true when it was sent.
  • false when the transaction does not exist or is empty, the callback is not a public of the script, the format does not match the values, or a limit of the handle refused it.

Home

Guides

Reference

Functions

Connections
Queries
Cache
JSON cells
ORM
Queries built in pieces
Prepared statements
Batches
Transactions
Passwords
Callbacks

Clone this wiki locally