PHP-PDO
I finally got around to checking out a talk at OSCON, specifically Wes Furlong's PDO talk. PDO is the new object-oriented data access abstraction in PHP 5.1. I've already checked this out at home a bit using this tutorial and it seems pretty cool, and obviously modelled a bit after Perl's DBI.
Probably the biggest difference between PDO and the myriad other database/PHP thingies out there is that it is all in C, so it should be danged fast if anything. The code ends up looking disturbingly like Perl's DBI, but at least you can prepare statements. As PHP5 becomes more mainstream, hopefully projects like Drupal will move to using it, and gain some performance benefits along the way...
"The code ends up looking disturbingly like Perl's DBI, but at least you can prepare statements." You can't prepare statements in Perl? I am pretty sure you can, but maybe this is an extension of the DBD instead of the DBI layer. I have done quite a few prepare statements in Perl using DBI/DBD::MySQL. Maybe my definition of a perpare statement is a bit different than yours or I could be reading your post incorrectly.
Posted by: Anthony | August 04, 2005 at 02:25 PM
Sorry, I should have been clearer. 'At least now you can prepare statements in PHP, like you can in Perl' =). Yay!
I actually like DBI, the thing thatv annoys me most about perl is the data structures ie accessing data in hashes stored in an array ref or something.
Posted by: jeffg | August 10, 2005 at 08:48 PM
Actually, there is a ADODB extension that will speed up the commonly used tasks in ADODB.
Since PDO is modeled after DBI, it's no surprise about the syntactic similarity.
Too bad it won't build a proper makefile for me (Mac OS X Tiger, PHP 4.0.3) and 4.1beta has some strange shared library issues again (this time crapping out with a bad magic number error).
Posted by: terry chay | August 12, 2005 at 12:22 AM