View Single Post
Old 05-18-2009, 07:51 PM   #1 (permalink)
captainmerton
The Acquainted
 
captainmerton's Avatar
 
Join Date: May 2009
Posts: 178
Thanks: 9
captainmerton is on a distinguished road
Default Generating objects from a MySQL select statement

How do I handle object generation when i'm calling a database to select several rows. Assuming I should instantiate each object or row as I retrieve them - would i create a static method in my class to read the rows from the table and when i read through them instantiate a class for each row?

Am i completely off the mark here. Have been reading a few OO PHP books but this isnt clear to me from them.
captainmerton is offline  
Reply With Quote