| title | PDO::rollBack |
|---|---|
| description | API reference for the PDO::rollBack function in the Microsoft PDO_SQLSRV Driver for PHP for SQL Server. |
| author | David-Engel |
| ms.author | davidengel |
| ms.date | 08/10/2020 |
| ms.service | sql |
| ms.subservice | connectivity |
| ms.topic | reference |
[!INCLUDEDriver_PHP_Download]
Discards database commands that were issued after calling PDO::beginTransaction and returns the connection to auto commit mode.
bool PDO::rollBack ();
true if the method call succeeded, false otherwise.
PDO::rollback is not affected by (and does not affect) the value of PDO::ATTR_AUTOCOMMIT.
See PDO::beginTransaction for an example that uses PDO::rollback.
Support for PDO was added in version 2.0 of the [!INCLUDEssDriverPHP].