Subject Re: [firebird-php] Transaction over multiple connection
Author Anatol Ogórek
Użytkownik Anatol Ogórek napisał:

>I would like to start transaction over multple connections:
>So I coded it like this:
> $host = 'localhost:/opt/firebird/invoice.gdb';
> $username = 'SYSDBA';
> $password ='masterkey';
> $dbh = ibase_connect($host, $username, $password);
> $dbh2 = ibase_connect('localhost:/opt/firebird/invoice.gdb',
>$username, $password);
> if (!$dbh) die ("error connecting to database");
> $tr = ibase_trans( IBASE_COMMIT, $dbh, IBASE_COMMIT,$dbh2);
>But how should I call a query?
>I call it like this:
>$sth = ibase_query($tr, $query);
>and I got warning;
>*Warning*: ibase_query() [function.ibase-query
><http://localhost/function.ibase-query>]: Link id is ambiguous:
>transaction spans multiple connections. in
>*/usr/local/apache2/htdocs/connect.php* on line *19
>*Can You help me?
I searched a little bit more in docs, and I think I'll answer myself...
I need to do:

$sth = ibase_query($dbh, $tr, $query);
$sth = ibase_query($dbh2,$tr, $query);

Sorry for bothering..

Best regards