Subject Re: Transactions with prepared statements CRASH.
Author paulruizendaal
--- In firebird-php@yahoogroups.com, "Fabio Gomes" <fabioxgn@...> wrote:
>
> Sorry if what i am saying is stupid but,
>
> the syntax for the ibase_tras is: *ibase_trans* ( [int trans_args [,
> resource link_identifier]] )
>
> Aren´t you passing the parameters in the inverse order?
>
> you are using: $trans = ibase_trans($db,
> IBASE_WRITE|IBASE_CONCURRENCY|IBASE_WAIT);
>
> shouldn´t it be: $trans =
> ibase_trans(IBASE_WRITE|IBASE_CONCURRENCY|IBASE_WAIT, $db);?

You are absolutely right:
http://www.janus-software.com/fbmanual/manual.php?book=php&topic=18

The original form starts a default transaction on connection $db, and
sets modifiers for another connection -- which isn't given and hence
the modifiers are ignored.

Still doesn't explain a crash, though.

Paul