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

PHP mysqli_rollback() Function

PHP mysqli_rollback() Function

PHP mysqli Reference Manual PHP mysqli Reference Manual

Turn off auto-commit, run some queries, commit them, then roll back the current transaction:






Definition and Usage

The mysqli_rollback() function rolls back the current transaction for the specified database connection.

**Tip:** See the mysqli_commit() function to commit the current transaction for the specified database connection. See the mysqli_autocommit() function to turn auto-committing of database modifications on or off.


Syntax

mysqli_rollback(

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