⇧
vadnica-logo
My Services About the Project Telegram O meni O meni

mysqli_rollback()

The mysqli_rollback() function rolls back (undoes) all changes of the current transaction for the specified connection. This means that the database is reverted to the state it was in before the transaction started.

EXAMPLE
RESULT
The result will be displayed here...

Practical use: We use transactions when executing multiple related operations (e.g., transferring money between accounts). If any step fails, we call mysqli_rollback() to prevent partial or incorrect entries in the database.