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

60 lines
1.5 KiB
PHP
Executable File

<?
defined('BASEPATH') OR exit('No direct script access allowed');
class m_realtime_keyword extends CI_Model{
// 생성자, 해당 모델이 생성될때 항상 실행되는 초기화작업
function __construct(){
parent::__construct();
$this->load->database();
$this->load->library('session');
}
#---------------------------------------------------------------------------
# PURPOSE : all list
# CREATE : 2018-04-09
#---------------------------------------------------------------------------
function realtime_keyword_all_list(){
$this->db->where('is_del', 'N');
$this->db->from('realtime_keyword');
$this->db->order_by('rank', 'asc');
$this->db->limit('20');
$res = $this->db->get();
$row = $res->result_array();
return $row;
}
#---------------------------------------------------------------------------
# PURPOSE : list
# CREATE : 2018-04-11
#---------------------------------------------------------------------------
function realtime_keyword_list($req_data){
# request
$offset = $req_data['offset'];
$limit = $req_data['limit'];
$this->db->where('is_del', 'N');
$this->db->from('realtime_keyword');
$this->db->limit($limit, $offset);
$this->db->order_by('rank', 'asc');
$res = $this->db->get();
$row = $res->result_array();
return $row;
}
}
?>