Re: DB_DataObject understanding Problem
| From: | Justin Patrin | Date: | Sun, 08 May 2005 19:32:31 +0000 |
| Subject: | Re: DB_DataObject understanding Problem | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19111@lists.php.net to get a copy of this message | ||
On 5/8/05, Torsten Raudssus <torsten@raudssus.de> wrote:
> Hi,
>
> I got a small problem understanding the use of the factory twice. I got
> a function who reads some variable table. The problem is now very easy.
> I don't know if i called the factory once or not.
>
> function bla($ref) {
> ...
> $ref_db=&DB_DataObject::factory($ref);
> ...
> while($ref_db->fetch()) {
> ...
> }
>
> When i call the function second time with the same $ref, the result is
> empty. Is there a way to "reset" a DataObject? that would help me over
> that problem at first. Any hints could be helpful.
>
You shouldn't need to do any "resetting". The factory sends you back a
completely new instance of the DO.
--
Justin Patrin