Following examples in the group I added a afterFind function in my
Contacts model like this:
function afterFind($result){
$result = parent::afterFind($result);
foreach($result as $key => $val) {
$result[$key]['Contact']['fullname'] = str_replace(' ',' ',
$val['Contact']['firstname'] . ' ' . $val['Contact']['lastname']);
}
return $result;
}
This adds a new field with the name 'fullname'. This work's in fine,
only problem is the following notice:
Notice (8): Undefined index: Contact [APP/models/contact.php, line
28]
Why this is I don't know, does somebody have any clues?
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---