[Update: Beta 3 is out; please report any/all bugs via http://bugs.php.net]
With the impending release of PHP 5.1b3, it's a good time to mention the status of PDO. We've had an excellent round of QA since beta 2, resulting in the following notable items:
- common core test suite to ensure individual driver conformance
- MySQL and PostgreSQL drivers now support native prepared statements and bound parameters (when available), for improved performance.
- OCI and ODBC drivers have been improved.
- PDOStatement::closeCursor() method has been added, to explicitly free up a database connection if you're done with a result set before you reach the end.
- Added $db->getAttribute(PDO_ATTR_DRIVER_NAME) to tell you which driver is in use (mostly useful for people writing layers over the top of PDO).
- Enabled the unix build of PDO_DBLIB, which provides access to Sybase/MSSQL servers via freetds. This driver is not as mature as the others, so feedback is especially welcomed. If you're running on windows, you'll probably have a better experience using PDO_ODBC to talk to SQL Server.
- There are no unresolved bugs (a couple of feature requests, but no bugs)
Enjoy :)
Would have reported this in bugs.php.net but there is no 5.1.0b3 version there yet.
The following worked in b2 but does not in b3.
<?php
header('Content-type: text/plain');
$db = new PDO( 'mysql:dbname=mysql;host=localhost', '********', '********' );
print_r($db->query('SHOW TABLES'));
?>
In b2 this returned: PDOStatement Object ( [queryString] => SHOW TABLES )
In b3 I get nothing. Furthermore, I basically can't get anything to work. $stmt->execute() always returns false. $stmt->fetch() returns nothing. And accessing PDOStatement::getColumnMeta() causes a segfault.
Thanks for letting me know so soon; fixed in CVS and I'll ask Andi to re-roll the tarball.
