I'm trying to combine two fields (name & extension) for display in a computer inventory list. This works when I view my index of computers, but throws an error when i view the index of employees. I'm using this code in my employee model:
<?php class Employee extends AppModel { var $name = 'Employee'; function afterFind($results) { foreach ($results as $key => $val) { $results[$key]['Employee']['name_ext'] = $val['Employee']['name'] . ', ' . $val['Employee']['extension']; } return ($results); } } ?> This is the error I get when I go to http://localhost/employees/ Notice: Undefined index: Employee in C:\wamp\www\app\models \employee.php on line 11 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---