On the PHP::Impact blog Federicopoints out a new feature/update that the Propel team has made to help with performance - a change from Creole to the based PDO layer that PHP includes.
This change has a number of implications, particularly for those who are executing SQL directly. PDO's API is loosely similar to Creole's, so this change shouldn't require any major re-architecture.
New features that come along with this move you might have to upgrade for include the newer DSN format for build/runtime properties, the removal of the mysqli adapter, SPL autoload integration and a few API changes you'll have to look out for. You can find out more information on the Symfony framework's support for these changes on the sfPropelPlugin and DbFinderPlugin pages.
Kae Verens has posted a review of another of Packt Publishing's PHP-related offerings, "Learning PHP Data Objects" by Dennis Popel (published in Aug 2007).
Learning PHP Data Objects, by Dennis Popel, is an introduction to PDO, which walks through the building of a believable test example - a library manager for your home library. [...] I really couldn't find very much about this book that I didn't like. Ignoring the appendices, the book is 154 pages purely devoted to teaching PDO through examples, including error handling, working with BLOBs, even the creation of the M in MVC (Models).
The review mentions Models, Active Record and how the book creates a Library manager application that includes the use of prepared statements and transactions.
Matthew Turland has posted about his experience working with a Windows XP system trying to get PHP 5.2 and SQL Server 2000 to play nicely together:
Recently at work, I was tasked with finding a method to retrieve data from a third-party SQL Server 2000-based system into our own MySQL-based application. It's worth noting that both system are behind their own firewalls and I was trying to bear security in mind as I did this.
Some highlights of his work included using GoToAssist to get to the system, using EMS SQL Manager to work with the SQL server itself and some of the PHP code he "threw at it" to grab the info he needed from the database (with the PDO drivers).
The Internet Super Hero blog has announced the release of the latest alpha version of the mysql native driver for PDO - version 1.0.2-alpha (PDO_MYSQLND):
I am glad to announce the availability of the first alpha version of PDO_MYSQLND. PDO_MYSQLND is a PHP PDO driver for MySQL based on the MySQL native driver. PDO_MYSQLND 1.0.2-alpha is available for download on http://downloads.mysql.com/forge/pdo_mysqlnd_preview.
Updates include fixes for return values, patches for memory leaks, more code coverage and some "very promising results" running on a set of dedicated testing machines.
Rob Allen has posted a review of the Packt Publishing book "Learning PHP Data Objects" over on his blog today:
Packt Publishing recently sent me a couple of books to review. This post is about the second one I received, Learning PHP Data Objects by Dennis Popel. I was excited to receive this book as PDO underlies a lot of the Zend_Db_Adapter objects that I use in my day to day programming. It seemed like a good idea that I should know more about it.
He provides some good detail of what the book covers (chapter by chapter) as well as a summary including his recommendation for who should use the book and how they can best enjoy its contents.
Marco Tabini has posted his list of what he considers five features of PHP5 that you "can't afford to ignore" when doing your development work:
Despite the fact that you may not have a choice in the matter, upgrading comes with a number of bonus new features that can help you write better code and gain access to new functionality that required a fair amount of hacking in previous version. Here's a quick list of 5 personal favourites.
The feature to make his list are SimpleXML, JSON/SOAP, PDO, the Standard PHP Library and SQLite. Each has their own bonus feature(s) included too for a little extra incentive to check them out.
The Internet Super Hero blog has posted about a preview release of the PDO_MYSQLND and a connector for MySQL to Open Office that have both been announced at this year's MySQL Conference.
The post explains what each of the technologies are for and where they fit in most development. The PDO_MYSQLND functionality is a direct connection for the PDO libraries to connect to MySQL using the native driver.
PDO_MYSQLND inherits all benefits of the MySQL native driver for PHP. In addition to the shared advantages you get the first PDO driver for MySQL developed by Sun/MySQL!
Every so often I try to use PDO under PHP5, and every time I run in to basic functionality problems with no ability to find out what's going on under the hood.
He includes a few comments supporting his statement including an issue where a prepare() call didn't work, his frustration with not being able to see what's "under the hood" and the lack of documentation to help with these sorts of issues.
On the Internet Super Hero blog, there's a post that looks at how PDO is implemented in PHP and wonders if the PDO::FETCH_UNIQUE constant is broken (as something to fix before even considering the move to PDO2).
I spent quite a lot of time comparing the different behaviours of the various drivers in the hope I could find out how PDO drivers are supposed to work. The PDO documentation and the specification do not cover each and every detail. PDO really needs some love...
He picks out the FETCH_UNIQUE constant as one that needs a little work and tries to track down exactly what it's doing. One issue he found was that it requires combination with other flags to make the unique part of it work correctly (like FETCH_OBJ or FETCH_COLUMN). He works through several examples, both ones that apply the unique call and others that don't, comparing the results.