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

class m_bbs_faq_category extends CI_Model{

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

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

	#---------------------------------------------------------------------------
    # PURPOSE :	list
    # CREATE  :	2018-05-04
    #---------------------------------------------------------------------------
	function bbs_faq_category_all_list(){

		$this->db->where('is_del', 'N');
		$this->db->from('bbs_faq_category');
		$this->db->order_by('idx',  'asc');
		$res = $this->db->get();
		$row = $res->result_array();

		return $row;
	}


	function bbs_faq_category_all_list_with_depth1(){

		$this->db->where('is_del', 'N');
		$this->db->where('depth', 1);
		$this->db->from('bbs_faq_category');
		$this->db->order_by('idx',  'asc');
		$res = $this->db->get();
		$row = $res->result_array();

		return $row;
	}

}
?>



