Subject Re: [firebird-php] Current firebird_pdo status?
Author Lester Caine
Matthias Hanft wrote:
> Hello,
>
> I'm using PHP 5.2.12 (5.3 isn't available yet for Gentoo Linux).
> Accessing Firebird using the "ibase_..." functions works very well.
> But now, I installed the "pdo_firebird" extension (version 0.2)
> manually by using "pecl". I did this because I have to write
> the same PHP code for two different companies - company #1 uses
> Firebird, company #2 uses mySQL. So I thought it would simplify
> my PHP code using PDO. (No, I can't persuade company #2 to use
> Firebird as well.)
>
> But things like "bindValue", "bindParam", or "execute" (with PDO's
> "PDOStatement" class) just don't work (giving strange error messages)
> or even cause a segmentation fault by Apache.
>
> Seems "the PDO_Firebird driver needs A LOT of love" from
> http://www.alberton.info/php_pdo_firebird_status.html is still true?
>
> Will pdo_firebird work flawlessly in PHP 5.3? Or would you discourage
> from using pdo_firebird generally? Of course, it's no problem to write
> PHP code as
>
> switch ($dbType) {
> case FIREBIRD: ibase_connect...
> case MYSQL: mysql_connect...
> }
>
> it's just more code and more IFs and SWITCHs, but if I could see a
> working PDO implementation appear on the horizon, I'd prefer PDO
> because it's less code and more elegant.

PDO needs a lot more love for every driver. It was badly designed from day one,
and no one is bothering to fix it! The MySQL guys are just working on their own
drivers, as are the Posgresql mob.

Ive been using ADOdb as a proper database abstraction layer, and there is a lite
version of that, as well as a couple of alternatives. But PDO is probably a dead
end as far as database abstraction. It can't even do just the data bit as you
have found ;)

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php