For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > December 2005 > Re: [PEAR] Problem storing DB_DataObject result in session









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR] Problem storing DB_DataObject result in session
Justin Patrin

2005-12-16, 3:56 am

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 o=

ne
> result record that has been fetched. However I'd really like to be able t=

o
> do a find(), save the DataObject in a session variable, and then later co=

me
> 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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com