[eluser]Russell Keith[/eluser]
I am very confused. I have three models MRecords, MMail, and MUsers. From withing MRecords I can call my user function from MUsers to get the username, but I can't call my function from MMail to send a message I get the folloing error.
Quote:A PHP Error was encountered
Severity: Notice
Message: Undefined property: MRecords::$MMail
Filename: models/mrecords.php
Line Number: 353
Here is a section of the code that is causing me trouble.
Code:
class MRecords extends Model {
function MRecords(){
parent::Model();
}
function updateHRRecords($data,$user){
$insert = array(
'recordID' => $id,
'denialNum' => $num,
'denialReason' => $data['reason_'.$id],
'denialUser' => $this->MUsers->getUserFullName($user,1)
);
$this->db->insert('denial_trail',$insert);
$this->db->select('name,email');
$this->db->where('id',$id);
$Q = $this->db->get('record');
$a = $Q->row();
$Q->free_result();
$this->MMail->denialEmail(boring variables...);
}
}
Thanks in advance for any help.