<?php
defined('BASEPATH') OR exit('No direct script access allowed');
 
    class ExportModel extends CI_Model {
 
        public function __construct()
        {
            $this->load->database();
        }
        
        public function exportList() {
            $this->db->select(array('id', 'name', 'mobile_number', 'email', 'dob', 'class_teacher'));
            $this->db->from('school_staff');
            $query = $this->db->get();
            return $query->result();
        }
        
        public function get_item_info($id,$table){
            $info=array();
            $this->db->select('*');
            $this->db->from($table);
            $this->db->where('id',$id);
            $this->db->order_by('student_name',"asc");
            $info=$this->db->get()->result_array();
            return $info;
        }
        
        public function get_acedemic_session_course_students($acedemic_session,$course){
            $table='student_courses_data';
            $info=array();
            $this->db->select('*');
            $this->db->from($table);
            $this->db->where('acedemic_session',$acedemic_session);
            $this->db->where('class',$course);
            $info=$this->db->get()->result_array();
            return $info;
        }
        
        
    }
?>