I am trying to get data from others table but when I join serviceplan table the result of query is empty but when I remove serviceplan table its fetched data perfectly.
Here is the code of my Model(without serviceplan table-working)
public function send_mail() {
    // $user_id=$this->session->userdata('user_id');
    $query=$this->db->select('*, employee.name_emp as emp_name, customer.name as cust_name, servicetype.name_set as s_name',
        'serviceplan.price as p_rice')->from('appointment')
        // ->where('id_app',$appointment_id)
        ->join('customer', 'customer.id= appointment.name_app')
        ->join('servicetype', 'servicetype.id_set= appointment.sertype')
        ->join('employee', 'employee.id_emp= appointment.emp')
        // ->join('serviceplan', 'serviceplan.id_sep= appointment.price_app')
        ->get();
    echo $this->db->last_query();
    exit();        
    return $query->result();
}
 
     
     
    