<?php
class MiscellaneousModel extends CI_Model {
    
    public function check_fee_head_exist($fee_head,$fee_amount_type,$table){
        $info=array();
        $this->db->select('*');
        $this->db->from($table);
        $this->db->where('fee_head',$fee_head);
        $this->db->where('fee_amount_type',$fee_amount_type);
        $info=$this->db->get()->result_array();
        return $info;    
    }
    
    public function insert_data($data_array,$table){
        $this->db->insert($table,$data_array);
        return $this->db->insert_id();
    }

    public function get_data($table){
        $info=array();
        $this->db->select('*');
        $this->db->from($table);
        $info=$this->db->get()->result_array();
        return $info;
    }
}