File: /var/www/html/nt/application/models/admin/Msis.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Msis extends CI_Model {
public function __construct() {
parent::__construct();
}
public function get_sis($where = array()){
$this->db->select('pdet.*, p.project_name');
$this->db->from('project_det pdet');
$this->db->join('project p', 'pdet.project_id = p.project_id', 'LEFT');
if(!empty($where)){
$this->db->where($where);
}
$this->db->order_by('pdet.project_det_id','DESC');
$query=$this->db->get();
//echo $this->db->last_query();die;
return $query->result_array();
}
public function get_project_detail($where = array()){
$this->db->select('pdet.*, p.project_name, c.category_name');
$this->db->from('project_det pdet');
$this->db->join('project p', 'pdet.project_id = p.project_id', 'LEFT');
$this->db->join('category c', 'pdet.category_id = c.category_id', 'LEFT');
if(!empty($where)){
$this->db->where($where);
}
$query=$this->db->get();
//echo $this->db->last_query();die;
return $query->row_array();
}
}