<?
defined('BASEPATH') OR exit('No direct script access allowed');

class m_search extends CI_Model{

	// 생성자, 해당 모델이 생성될때 항상 실행되는 초기화작업
	function __construct(){
		parent::__construct();

        $this->load->database();
        $this->load->library('session');
	}

	#---------------------------------------------------------------------------
    # PURPOSE : 뉴스, 칼럼, 라이프 list - 예약제외
    # CREATE  :	2018-03-23
    #---------------------------------------------------------------------------
	function all_list_limit100($req_data){
	    # request
        $article_keyword    = $req_data['article_keyword'];
        $sort_column        = $req_data['sort_column'];
        $sort_type          = $req_data['sort_type'];

        $this->db->where('(title like "%'.$article_keyword.'%" or content like "%'.$article_keyword.'%" or tag like "%'.$article_keyword.'%")');
        $this->db->where('is_display', 'Y');
        $this->db->from('vw_content');
        $this->db->order_by($sort_column,  $sort_type);
        $this->db->limit(100, 0);
        $res = $this->db->get();
        $row = $res->result_array();

        return $row;


    }






}
?>
