Thank you for your help.
If I use Containable ("POINT 1") I get the results I want but it takes
too many seconds (about 11 seconds).
If I use "POINT 2" I get an error:
"Notice (8): Undefined offset: 6"
The solution from POINT 3 I didn't try it.On 12 sep., 10:01, Jon Bennett <[email protected]> wrote: > Should read through before hitting send, victim of copy and paste below! > > point 2 should be: > > 2. Or get all the data as per normal and pull out the most recent report date > > // Alteratively you could grab all data > $this->data = $this->Client->find('all'); > > // And get the last record in the view > foreach($this->data as $row): > echo 'name: '.$row['Client']['name']; > if (isset($row['Report'])): > echo 'last report created: > '.$row['Report'][count($row['Report'])-1]['created']; > endif; > endforeach; > > doh > > j > > -- > > jon bennett > w:http://www.jben.net/ > iChat (AIM): jbendotnet Skype: jon-bennett --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
