McGansWebsite/application/models/Subject_model.php

22 lines
433 B
PHP
Raw Normal View History

2023-01-05 12:19:39 +00:00
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Subject_model extends CI_Model {
public function __construct() {
parent::__construct();
}
2023-01-10 09:41:20 +00:00
function subject_list($id)
2023-01-05 12:19:39 +00:00
{
$this->db->select('*');
$this->db->from('subject');
2023-01-10 09:41:20 +00:00
$this->db->where(array('status'=>1,'department'=>$id));
2023-01-05 12:19:39 +00:00
$query = $this->db->get();
2023-01-10 09:41:20 +00:00
//echo $this->db->last_query();exit;
2023-01-05 12:19:39 +00:00
return $query;
}
2023-01-10 09:41:20 +00:00
2023-01-05 12:19:39 +00:00
}