Re: Re: DataObject with ITX

From: Date: Tue, 15 Apr 2003 16:33:11 +0000
Subject: Re: Re: DataObject with ITX
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4853@lists.php.net to get a copy of this message
Hi, Looks like you're trying to make a report. Take a look at http://www.i-node.com.br/report. It can help you solve this problem and future ones. Nevre used DataObject with ITX, but i looks like your code can be written like this: $country = new DataObjects_Country; $client = new DataObjects_Client; // I want all countries, so we prepare a array with country as indexes. $country->find(); while ($country->fetch()) { // I want al clients from this country $client->CouId = $country->CouId; //This is the Country ID $client->find(); while($client->fetch()) { $clientArray[$country->CouId] = $client->toArray(); } } // Then we make the report: $report = new Report($clientArray, '.' , 'clientsPerCountry.tpl.html'); $report->setTitle('country', 0); $report->setBlockValueName("client"); $report->makeReport(); $report->show(); Didn't test it, so may need some fix to work, but that is the basic idea. Regards S.Rocha ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/

« previous php.pear.general (#4853) next »