Firebird 2.0
PHP5 Programming
Manual

FBIRD_ROLLBACK_RET

Purpose

Use the fbird_rollback_ret function to roll back a transaction without closing it.

Syntax

<rollback_ret> ::=
     fbird_rollback_ret( )
   | fbird_rollback_ret( trx_hndl )
   | fbird_rollback_ret( conn_hndl )


Element 
Type
Description
trx_hndl
resource
A valid transaction handle
conn_hndl
resource
A valid connection handle
<return>
bool
True on success, False on failure

Semantics

The fbird_rollback_ret function rollbacks a transaction.The transaction context will be retained, so open cursors opened within this transaction will not be invalidated. This function returns True on success or False on failure.

If called without an argument, this function rolls back the default transaction of the default connection. If the argument is a connection handle, the default transaction of the corresponding connection will be rolled back. If the argument is a transaction handle, the corresponding transaction will be rolled back.

If the transaction handle refers to multiple connections, the transaction is rolled back on all connections using a two-phase rollback protocol.

Example

The below example rolls back the default transaction on the connection that was opened last:

fbird_rollback_ret();



See also

fbird_commit_ret, fbird_rollback_ret, fbird_rollback, fbird_trans


previous page goto index next page

Legal information