Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Ilia Alshanetsky's Blog:
PDO_MySQL Buffered Query Support
Jun 27, 2005 @ 11:55:10

Ilia Alshanetsky has a new post on his blog today with a little look into a handy little feature he's sneaking into the MySQL portion of the PDO support in PHP 5.1 before it comes out.

PHP 5.1 is well on its way towards release, so very little time is left to sneak in forgotten or missing features into it. One very handy (IMHO) feature that I've added to the PDO MySQL driver is the ability to toggle usage of buffered queries.

Up until now any query executed would be unbuffered, which limited you to operation with just a single result cursor at a time. The only way to avoid this limitation was to use fetchALL() method to pre-fetch results into array and then use them. This however is not always possible or practical as I've found out in the progress of adding PDO support to FUDforum.

Keep an eye out for PHP 5.1 (stable) to be coming out very soon, and, if you haven't gotten a chance to check it out and help with the debugging yet, head on over to snaps.php.net and get the latest copy (sure to have the MySQL buffering in it by now!)

tagged:

Link:


Trending Topics: