$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?
I would use the example in the DB_DataObject documentation. Your code above is fine if there is at least 1 record in the table.
You should only use "do { ... } while ()" if the code in the loop needs to run one or more times, or "while () {...} " if it is to run zero or more times.
HTH,
Mark
--
Mark Mitchenall, Standingwave Ltd
(Complete Hosting and Development Services)
Tel := +44 (0)20 8452 3031
Email := mark@standingwave.co.uk mark@mitchenall.com
Home := http://www.standingwave.co.uk http://www.mitchenall.com