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; } } ?>