Re: Problem storing DB_DataObject result in session

From: Date: Fri, 16 Dec 2005 05:44:28 +0000
Subject: Re: Problem storing DB_DataObject result in session
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22267@lists.php.net to get a copy of this message
On 12/14/05, Joseph Szobody <php-newsgroup@signaturetechstudio.com> wrote: > Folks, > > I have no problems storing a DB_DataObject in the session when there is one > result record that has been fetched. However I'd really like to be able to > do a find(), save the DataObject in a session variable, and then later come > back to it and do a while($object->fetch()). For example... > Won't work. Doing a find only runs the query. If you don't pull the record (fetch) then you'll lose the result when the script exits. Store each of the fetched objects in an array and put that in a session. Or refactor to not need it. -- Justin Patrin

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