Hi All,

I have on my view page of properties in the controller which is
working as I want it to.


// GET THE ESTATE AND STAFF NAMES
$estate_name = $this->Property->User->find('first', array('conditions'
=> array('Account.id' => $this->Property->field('estate_id')),
'fields' => array('Account.first_name', 'Account.last_name')));
$staff_name = $this->Property->User->find('first', array('conditions'
=> array('Account.id' => $this->Property->field('staff_id')), 'fields'
=> array('Account.first_name', 'Account.last_name')));
$this->set(compact('estate_name','staff_name'));

(Call them like: <?php echo $estate_name['Account']['first_name'] . '
' . $estate_name['Account']['last_name']; ?>)


I somehow need to get this same data on the index view within a for
loop for each row, how would I go about this? The estate_name and
staff_name need to be found for each record down the page.

Thankyou

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to