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

class m_advertisement extends CI_Model{

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

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


	#---------------------------------------------------------------------------
    # PURPOSE :	life - list
    # CREATE  :	2018-04-11
    #---------------------------------------------------------------------------
	function find_ad_by_page_key($req_data){
        
        $page_key=$req_data;

        $this->db->select('a.*, b.*');
        $this->db->where('a.page_key', $page_key);
        $this->db->from('ad_page as a');
        $this->db->join('ad_detail as b', 'a.idx=b.ad_idx');
        $res = $this->db->get();
        $row = $res->result_array();

        return $row;
    }
}

?>
