first commit
This commit is contained in:
43
application/models/admin/comm/m_search.php
Executable file
43
application/models/admin/comm/m_search.php
Executable file
@@ -0,0 +1,43 @@
|
||||
<?
|
||||
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;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user