sqlsrv_begin_transaction - Begins a database transaction
Code Examples

sqlsrv_begin_transaction( resource$conn ): bool

The transaction begun by sqlsrv_begin_transaction includes all statements that were executed after the call to sqlsrv_begin_transaction and before calls to sqlsrv_rollback or sqlsrv_commit. Explicit transactions should be started and committed or rolled back using these functions instead of executing SQL statements that begin and commit/roll back transactions. For more information, see SQLSRV Transactions.



The connection resource returned by a call to sqlsrv_connect.

Return Values

Returns true on success or false on failure.

Related Functions

Example of sqlsrv_begin_transaction

Show all examples for sqlsrv_begin_transaction

PHP Version: