first commit
This commit is contained in:
68
application/models/web/m_review_log.php
Executable file
68
application/models/web/m_review_log.php
Executable file
@@ -0,0 +1,68 @@
|
||||
<?
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class m_review_log extends CI_Model{
|
||||
|
||||
// 생성자, 해당 모델이 생성될때 항상 실행되는 초기화작업
|
||||
function __construct(){
|
||||
parent::__construct();
|
||||
|
||||
$this->load->database();
|
||||
$this->load->library('session');
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : select
|
||||
# CREATE : 2018-04-17
|
||||
#---------------------------------------------------------------------------
|
||||
function review_log_where_member_id_content_idx_select($req_data){
|
||||
# request
|
||||
$member_id = $req_data['member_id'];
|
||||
$content_idx = $req_data['content_idx'];
|
||||
|
||||
$this->db->where('member_id', $member_id);
|
||||
$this->db->where('content_idx', $content_idx);
|
||||
$this->db->from('review_log');
|
||||
$res = $this->db->get();
|
||||
$row = $res->row_array();
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : delete
|
||||
# CREATE : 2018-04-17
|
||||
#---------------------------------------------------------------------------
|
||||
function review_log_delete($idx){
|
||||
|
||||
$this->db->where('idx', $idx);
|
||||
$row = $this->db->delete('review_log');
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# PURPOSE : insert
|
||||
# CREATE : 2018-04-16
|
||||
#---------------------------------------------------------------------------
|
||||
function review_log_insert($req_data){
|
||||
|
||||
$now_date = date("Y-m-d H:i:s");
|
||||
$req_data['reg_date'] = $now_date;
|
||||
|
||||
$row = $this->db->insert('review_log', $req_data);
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user