mysqli::commit

mysqli_commit

Commits the current transaction

&reftitle.description;

&style.oop;

public `bool` `mysqli::commit` `int` `flags` 0 ``string``null```name`&null;

&style.procedural;

`bool` `mysqli_commit` `mysqli` `mysql` `int` `flags` 0 ``string``null```name`&null;

Commits the current transaction for the database connection.

&reftitle.parameters;

&mysqli.link.description;

`flags`

- A bitmask of `MYSQLI_TRANS_COR_*` constants.

`name`

- If provided then `COMMIT/*name*/` is executed.

&reftitle.returnvalues;

&return.success;

&reftitle.errors; &mysqli.conditionalexception;
&reftitle.changelog;

&Version; | &Description;
8.0.0 | `name` is now nullable.

&reftitle.examples;

See the `mysqli::begin_transaction` example.

&reftitle.notes;

This function does not work with non transactional table types (like MyISAM or ISAM).

&reftitle.seealso;

- `mysqli_autocommit`
- `mysqli_begin_transaction`
- `mysqli_rollback`
- `mysqli_savepoint`