<?php 

class Appfeedback_model extends CI_Model {
	
	public function _consruct(){
		parent::_construct();
 	}

 	public function get_doctor_feedback(){
 		$this->db->select('tbl_doctors.name,tbl_app_feedback.*');
 		$this->db->join('tbl_doctors','tbl_doctors.id = tbl_app_feedback.doctor_id');
 		$this->db->group_by('tbl_app_feedback.id');
 		$result = $this->db->get_where('tbl_app_feedback',array('doctor_id !=' =>'0'))->result();
 		if($result){
 			return $result;
 		}else{
 			return false;
 		}
 	}

 	public function get_patient_feedback(){
 		$this->db->select('tbl_registration.name,tbl_app_feedback.*');
 		$this->db->join('tbl_registration','tbl_registration.id = tbl_app_feedback.user_id');
 		$this->db->group_by('tbl_app_feedback.id');
 		$result = $this->db->get_where('tbl_app_feedback',array('user_id !=' => '0'))->result();
 		if($result){
 			return $result;
 		}else{
 			return false;
 		}
 	}
}