View Single Post
Old 05-18-2009, 08:00 PM   #2 (permalink)
allworknoplay
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

Well I am no OOP pro, but you only instantiate your object once.

You then use that object to access your methods.

So if you had a query method, your main script would be something like this:

$object->query('SELECT * FROM users');

$rows = $object->results();

Then loop through to get your data:

foreach($rows AS $data) {
//code

}
allworknoplay is offline  
Reply With Quote