Re: Simple DB_DataObject question...

From: Date: Mon, 05 Jul 2004 08:34:37 +0000
Subject: Re: Simple DB_DataObject question...
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13488@lists.php.net to get a copy of this message
You could either store the results using $array[] = clone($my_obj); or you could clone the object before you run find() on it. (most databases cache results, so if the query is the same, the result is cached inside the database, and hence is just as fast.) Regards Alan Joseph Szobody wrote:
Folks, I want to loop through a DB_DataObject.... while($my_obj->fetch()) {
    // Do something
} ... then later on in the same script I want to loop through the object again, starting from the beginning.... while($my_obj->fetch() {
    // Do something else
} ... so of course I need to reset the dataset so that fetch() starts at the beginning the second time. How do I do this? Joseph
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

« previous php.pear.general (#13488) next »