DB_DataObject how to iterate through a table?
| From: | Hakan Kücükyilmaz | Date: | Mon, 16 Feb 2004 06:43:08 +0000 |
| Subject: | DB_DataObject how to iterate through a table? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-10708@lists.php.net to get a copy of this message | ||
Hi,
I am testing DB_DataObject and wondering how to iterate through a table. What I tried is:
$Termin = new DataObject_Termin();
$Termin->find(TRUE);
do {
echo $Termin->termin_id , '<br />';
echo $Termin->termin_titel, '<br />';
echo $Termin->termin_datum, '<br />';
echo '<br />';
} while ($Termin->fetch());
----------------------
Which iterates through the table 'Termin'. Does this approach has any drawbacks?
regards Hakan
--
Hakan Kuecuekyilmaz, University of Applied Sciences Esslingen, Germany