What does the car-chasing dog do with a car when he catches one?
I've got a similar problem. I have several Classes in a PHP 5 project accessing a MySQL database to initialize objects for that Class (among other things). I'm working my way through PHP5 Objects, Patterns, and Practice, and Zandstra recommends moving all the database-talking to its own Class.
With help from http://www.kitebird.com/articles/peardb.html#TOC_1 , I got my DB_Administrator Class connecting, executing a statement sent as a parameter , disconnecting from the database, and returning the results to the object that requested it.
I wanted the requesting object to process the data since the requests are so varied, but when I did a getClass() on what I was getting back, it was a DB_RESULT object. I've looked on the web, some PHP books I have at home, and this forum for guidance on how to extract my data from a DB_RESULT object, but nothing really clear turned up. Can anyone point me to a readable reference?