67 lines
1.6 KiB
PHP
Executable File
67 lines
1.6 KiB
PHP
Executable File
<?
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class m_forbidden_word extends CI_Model{
|
|
|
|
// 생성자, 해당 모델이 생성될때 항상 실행되는 초기화작업
|
|
function __construct(){
|
|
parent::__construct();
|
|
|
|
$this->load->database();
|
|
$this->load->library('session');
|
|
}
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
# PURPOSE : 금칙어 count
|
|
# CREATE : 2018-05-03
|
|
#---------------------------------------------------------------------------
|
|
function forbidden_word_where_word_count($word){
|
|
|
|
$this->db->where('word', $word);
|
|
$this->db->from('forbidden_word');
|
|
$row = $this->db->count_all_results();
|
|
|
|
return $row;
|
|
}
|
|
|
|
|
|
#---------------------------------------------------------------------------
|
|
# PURPOSE : 금칙어 list
|
|
# CREATE : 2018-05-03
|
|
#---------------------------------------------------------------------------
|
|
function forbidden_word_list(){
|
|
|
|
$this->db->from('forbidden_word');
|
|
$res = $this->db->get();
|
|
$row = $res->result_array();
|
|
|
|
return $row;
|
|
}
|
|
|
|
#---------------------------------------------------------------------------
|
|
# PURPOSE : select
|
|
# CREATE : 2018-04-27
|
|
#---------------------------------------------------------------------------
|
|
function comment_select($idx){
|
|
|
|
# request
|
|
$this->db->where('idx', $idx);
|
|
$this->db->from('comment');
|
|
$res = $this->db->get();
|
|
$row = $res->row_array();
|
|
|
|
return $row;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
?>
|