Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP mysqli_commit() Function

PHP mysqli_commit() Function

PHP MySQLi Reference Manual PHP MySQLi Reference Manual

Example

Turn off auto-commit, run some queries, then commit them:


Definition and Usage

The mysqli_commit() function commits the current transaction for the specified database connection.

**Tip:** See the mysqli_autocommit() function to turn auto-committing of database modifications on or off. See the mysqli_rollback() function to roll back the current transaction.


Syntax

mysqli_commit(

connection

)

;

Parameters Description
connection Required. Specifies the MySQL connection to use.

Technical Details

Return Value: Returns TRUE on success, FALSE on failure.
PHP Version: 5+

PHP MySQLi Reference Manual PHP MySQLi Reference Manual