Files
cm-web-legacy/application/models/web/m_etc_section.php
2020-06-10 06:19:03 +09:00

67 lines
2.1 KiB
PHP
Executable File

<?
defined('BASEPATH') OR exit('No direct script access allowed');
class m_etc_section extends CI_Model{
// 생성자, 해당 모델이 생성될때 항상 실행되는 초기화작업
function __construct(){
parent::__construct();
$this->load->database();
$this->load->library('session');
}
#---------------------------------------------------------------------------
# PURPOSE : where theme_type select
# CREATE : 2018-04-09
#---------------------------------------------------------------------------
function etc_section_where_theme_type_list($etc_section_type){
$this->db->where('a.is_del', 'N');
$this->db->where('a.is_display', 'Y');
$this->db->where('b.is_del', 'N');
$this->db->where('b.is_display', 'Y');
$this->db->where('a.etc_section_type', $etc_section_type);
$this->db->from('etc_section as a');
$this->db->join('vw_content as b', 'a.content_type=b.content_type and a.content_idx=b.idx');
$this->db->order_by('a.rank', 'asc');
$res = $this->db->get();
$row = $res->result_array();
return $row;
}
#---------------------------------------------------------------------------
# PURPOSE : where in etc_section_type list
# CREATE : 2018-04-11
#---------------------------------------------------------------------------
function etc_section_where_in_etc_section_type_list($req_data){
# request
$etc_section_types = $req_data['etc_section_types'];
$this->db->where('a.is_del', 'N');
$this->db->where('b.is_del', 'N');
$this->db->where('b.is_display', 'Y');
$this->db->where('a.is_display', 'Y');
$this->db->where_in('a.etc_section_type', $etc_section_types);
$this->db->from('etc_section as a');
$this->db->join('vw_content as b', 'a.content_type=b.content_type and a.content_idx=b.idx');
$res = $this->db->get();
$row = $res->result_array();
return $row;
}
}
?>