f2a40c268b
1. Have to test and deploy in server. 2. add faculty detail into employee table and student detail into employee table, 3. Change Teaching Assistant into multiple select 4. User Profile
43 lines
957 B
PHP
43 lines
957 B
PHP
<?php
|
|
if (!defined('BASEPATH'))
|
|
exit('No direct script access allowed');
|
|
|
|
class Faculty_model extends CI_Model {
|
|
|
|
public function __construct() {
|
|
parent::__construct();
|
|
}
|
|
|
|
function list_fa()
|
|
{
|
|
$this->db->select('*');
|
|
$this->db->from('faculty');
|
|
$this->db->where(array('status'=>1));
|
|
$query = $this->db->get();
|
|
//echo $this->db->last_query();exit;
|
|
return $query;
|
|
}
|
|
|
|
function get_fac($id)
|
|
{
|
|
$this->db->select('f.*,e.id as employeeId');
|
|
$this->db->from('faculty as f');
|
|
$this->db->join('employee as e','e.typeId=f.id','INNER');
|
|
$this->db->where(array('f.status'=>1,'f.id'=>$id,'e.roleId'=>3));
|
|
$query = $this->db->get();
|
|
//echo $this->db->last_query();exit;
|
|
return $query;
|
|
}
|
|
|
|
function viewFaculty($id)
|
|
{
|
|
$this->db->select('*');
|
|
$this->db->from('faculty');
|
|
$this->db->where(array('status'=>1,'id'=>$id));
|
|
$query = $this->db->get();
|
|
//echo $this->db->last_query();exit;
|
|
return $query;
|
|
}
|
|
|
|
}
|