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

class m_tmp_find_key extends CI_Model{

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

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

    #---------------------------------------------------------------------------
    # PURPOSE :	insert
    # CREATE  :	2018-05-05
    #---------------------------------------------------------------------------
	function tmp_find_key_insert($req_data){

        $row = $this->db->insert('tmp_find_key', $req_data);
        return $row;
    }

    #---------------------------------------------------------------------------
    # PURPOSE :	count
    # CREATE  :	2018-05-04
    #---------------------------------------------------------------------------
	function tmp_find_key_where_type_content_type_key_auth_key_count($req_data){
        # request
        $type           = $req_data['type'];
        $content        = $req_data['content'];
        $type_key       = $req_data['type_key'];
        $auth_key       = $req_data['auth_key'];

	    $this->db->where('type', $type);
	    $this->db->where('content', $content);
	    $this->db->where('type_key', $type_key);
	    $this->db->where('auth_key', $auth_key);
        $this->db->from('tmp_find_key');
        $row = $this->db->count_all_results();

        return $row;
    }







}
?>


