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

mysqli_autocommit() and mysqli_commit()

By default, MySQL saves every command immediately. We can stop this with the mysqli_autocommit($connection, FALSE) function. This allows us to execute multiple commands and only confirm them all at once at the very end with mysqli_commit(). If something goes wrong, we can roll everything back.

EXAMPLE
RESULT
The result will be displayed here...

Local environment tip: When testing transactions on your computer, follow these steps to see the changes live: