For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > September 2005 > Reusing DB_DataObject









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 Reusing DB_DataObject
Jocke Selin

2005-09-30, 3:56 am

Hiya,

I'm trying to write a page that initially lists the content of a table, and
then includes a DB_DataObject_FormBuilder-form below it where you can add a
new entry or edit a selected entry.

I do a normal find() to fetch the list of entries, and then a while(->fetch())
to loop out the entries. However, when I come to use the
DB_DataObject_FormBuilder-form the form is always set to the last entry in
the fetch()-loop.

How do I reset the DB_DataObject's results?
Or do I need to clone the DB_DataObject before the loop?
Or do I need to recreate the object?

Thanks!

/Jocke
Sponsored Links







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

Copyright 2008 codecomments.com