2023-01-11 07:17:57 +00:00
|
|
|
<?php
|
|
|
|
if (!defined('BASEPATH'))
|
|
|
|
exit('No direct script access allowed');
|
|
|
|
|
|
|
|
class Degree_model extends CI_Model {
|
|
|
|
|
|
|
|
public function __construct() {
|
|
|
|
parent::__construct();
|
|
|
|
}
|
|
|
|
|
|
|
|
function deg_list()
|
|
|
|
{
|
2023-01-21 13:41:47 +00:00
|
|
|
$this->db->select('deg.*,d.id as departmentId,d.name as departmentName');
|
|
|
|
$this->db->from('degree as deg');
|
|
|
|
$this->db->join('department as d','d.id=deg.departmentId','INNER');
|
|
|
|
$this->db->where(array('deg.status'=>1));
|
2023-01-11 07:17:57 +00:00
|
|
|
$query = $this->db->get();
|
|
|
|
//echo $this->db->last_query();exit;
|
|
|
|
return $query;
|
|
|
|
}
|
|
|
|
|
|
|
|
function get_deg($id)
|
|
|
|
{
|
|
|
|
$this->db->select('*');
|
|
|
|
$this->db->from('degree');
|
|
|
|
$this->db->where(array('status'=>1,'id'=>$id));
|
|
|
|
$query = $this->db->get();
|
|
|
|
//echo $this->db->last_query();exit;
|
|
|
|
return $query;
|
|
|
|
}
|
|
|
|
|
|
|
|
function get_dep()
|
|
|
|
{
|
|
|
|
$this->db->select('id,name');
|
|
|
|
$this->db->from('department');
|
|
|
|
$this->db->where(array('status'=>1));
|
|
|
|
$query = $this->db->get();
|
|
|
|
//echo $this->db->last_query();exit;
|
|
|
|
return $query;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|