For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > May 2005 > Re: [PEAR] DB_DataObject understanding Problem









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] DB_DataObject understanding Problem
Justin Patrin

2005-05-08, 8:56 pm

On 5/8/05, Torsten Raudssus <torsten@raudssus.de> wrote:
> Hi,
>=20
> 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.
>=20
> function bla($ref) {
> ...
> $ref_db=3D&DB_DataObject::factory($ref);
> ...
> while($ref_db->fetch()) {
> ...
> }
>=20
> 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.
>=20


You shouldn't need to do any "resetting". The factory sends you back a
completely new instance of the DO.

--=20
Justin Patrin
Sponsored Links







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

Copyright 2008 codecomments.com