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.
So, what do you do when something is lacking in PHP? Write a patch of course!
As of yesterday you can set PDO_MYSQL_ATTR_USE_BUFFERED_QUERY attribute to TRUE to enable buffered queries and FALSE to disable them.
Yes and no, for new code ideally you would use fetchAll() which makes an array out of the result. But keep in mind that MySQL store result (buffered query) is far more effecient in terms of memory usage then a PHP array.
This seems like a very attractive feature to have in PDO
I always prefer to keep my applications as efficent as possible and moving around arrays of information sometimes containing more than 30,000 rows can be a bit of a hog.
Thats also because I am working with reports off of an oracle database but still using a fetch all style can increase the amount of memory your application is utilizing and can make the processor work a bit harder.
Application design in general should be first for security, then following a design pattern that fits your application, then keeping code clean and efficent. Most people leave these things out and say if it works it works no need to do anything else. The webservers can handle it, while that may be so in come cases this makes any project harder to maintain and more vunerible to faults.