Subject Re: [firebird-php] Re: Very fast read only transactions
Author Milan Babuskov
jeff_j_dunlap wrote:
> Thanks, very interesting. Is ibase_pconnect available for both read
> and write transactions?

Yes. ibase_pconnect gives you a database connection (attachment) and you
can start any kind of transaction on it.

> Also, is ibase_pconnect a container (like an array) of open
> connections that stay open waiting to serve requests?

Only internally. From PHP code you just call it with full parameter list:

$link = ibase_pconnect('db_path', 'user', 'pass', 'charset'...);

If there is no connection to that database for that user and password
and charset (and role), PHP will start a new one. If there is already
one connection like that in the pool it would reuse it.

> I'm interested in learning more so that I can create a class for use
> with the IBPP libray.

Make sure you serialize all the calls if you use multiple threads on the
web server.

Although all this seems nice, I have abandoned pconnect in PHP because
it seemed unstable (this way few years ago, so maybe it is fixed now)
and local connections with Firebird 2 are really fast.

--
Milan Babuskov
http://www.flamerobin.org
http://www.guacosoft.com