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