SunshinePHP Developer Conference 2015

ibase_trans

(PHP 5)

ibase_transInizia una transazione

Descrizione

int ibase_trans ([ int $trans_args [, int $link_identifier ]] )

Inizia una transazione.

add a note add a note

User Contributed Notes 2 notes

up
2
chAlx
2 years ago
Note that on some platforms ibase_trans($dbh), ibase_trans(IBASE_DEFAULT, $dbh) and ibase_trans($dbh, IBASE_DEFAULT) are not the same, but will run without errors in most cases.
up
1
jon at tgpsolutions dot com
12 years ago
When using transactions, you must execute queries using the transaction identifier as the link_identifier in ibase_query. 

Example:

$db = ibase_connect( ... );
$tr = ibase_trans();
$result = ibase_query($tr, $sql1);
$result = ibase_query($tr, $sql2);
ibase_rollback($tr);

You must use ibase_query($tr, $sql1).  Calling ibase_query($db, $sql1) will not allow you to roll back - it will be commited when the script finishes executing.
To Top