The way that I was thinking about doing this is - sending a object wrapper (@ return = array) into a stream, and then loading it into the buffer. I can then access the the parts of the buffer that I need, within the result set.
Is this possible with PHP? If so, there are two things that Im concerned about - garbage collection and open connetions to the database. The latter, I can always take care of, in some sort of deconstructor with the new flavour in the form of PHP 5.