// $ci->load->model('admin/etc_section/m_life_etc_section');
$req_data = array(
"search_type" => "",
"search_keyword" => "",
"search_category" => "",
"search_etc_section_type" => "6",
"sort_column" => "reg_date",
"offset" => 0,
"limit" => "1"
);
$result = $ci->m_life_etc_section->life_editor_etc_section_list($req_data);
?>
// $ci->load->model('admin/etc_section/m_life_etc_section');
$req_data = array(
"search_type" => "",
"search_keyword" => "",
"search_category" => "",
"search_etc_section_type" => "3",
"sort_column" => "reg_date",
"offset" => 0,
"limit" => "1"
);
$result = $ci->m_life_etc_section->life_etc_section_list($req_data);
// $result1 = $this->m_life_etc_section->life_etc_section_select();
$result2 = $this->m_life_etc_section->life_etc_section_detail_list($result[0]['idx']);
$arr_etc_section_detail_rank = array();
foreach ($result2 as $val) {
$arr_etc_section_detail_rank[$val['rank']] = array('idx'=>$val['idx'], 'main_img'=> $val['main_img'], 'head_title'=> $val['head_title'], 'title'=> $val['title'], 'content_idx'=> $val['content_idx'], 'hit_count'=>$val['hit_count'], 'editor_name'=>$val['editor_name'],
'partner_idx'=>$val['partner_idx'],
'video_url' => $val['video_url']
);
}
?>
$d = $ci->db->query("select * from (select a.*, b.category_name, c.channel_name, c.channel_icon, (select count(*) from partner where channel_idx=a.channel_idx) as editor_count, (select count(*) from life where channel_idx=a.channel_idx and is_del='N') as article_count, (select sum(hit_count) from life where channel_idx=a.channel_idx and is_del='N') as hit_count from life_etc_section as a join category as b on (a.category_idx = b.idx) join channel as c on (a.channel_idx = c.idx) where a.is_del='N' and b.is_del='N' and c.is_del='N' and a.etc_section_type = '3') as AA where 1 order by AA.reg_date desc limit 0, 30");
$d= $d->result()[0];?>
echo $d->channel_name;
?>
인기베스트 5
foreach($arr_etc_section_detail_rank as $i=>$data):
?>
">
=$i?>