Firebird 2.0
PHP5 Programming
Manual

FBIRD_ROLLBACK

Purpose

Use the fbird_rollback function to roll back a transaction, drop all open cursors on the transaction and invalidate the handle.

Syntax

<rollback> ::=
     fbird_rollback( )
   | fbird_rollback( trx_hndl )
   | fbird_rollback( 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 function rolls back a transaction.The transaction context will be released, so open cursors opened within this transaction will be dropped; the transaction handle is 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();



See also

fbird_commit_ret, fbird_rollback_ret, fbird_rollback, fbird_trans


previous page goto index next page

Legal information