Re: DataObjects
| From: | Alan Knowles | Date: | Sat, 09 Aug 2003 02:05:18 +0000 |
| Subject: | Re: DataObjects | ||
| References: | 1 | Groups: | php.pear.general php.pear.general |
| Request: | Send a blank email to pear-general+get-7125@lists.php.net to get a copy of this message | ||
Maurice Mengel wrote:
Hi! Think this is strange! The first time of the while-loop everything works perfect, the second doesn't return anything from the 2nd table (but from the first - lik it should be). Do I have to destroy sub-object _sendungID or perform any other action? In the examples it doesn't look like this, but only a few examples with getLinks... if only DataObjects had a bit more documentation... thx a lot Malzkorn while ($programm->fetch()) {try $pp = $programm->__clone(); $pp->getLinks(); as you will not make any changes to the object being looped on.. Regards Alan BTW. the latest dataObject can do $pp->getLinks('link_%s'); if you want prettier code :)
$programm->getLinks(); /* from table one*/ $res[$i]['datum']=$programm->datum;/* from another table*/ $res[$i]['s_name']=$programm->_sendungID->s_name; $i++;}