<?php

class Content_Model extends CI_Model {

    var $tableName = 'tbl_page';

    #============================== Get Page Record By Page ID ===========================================================#

    public function getContentRecordByContentId($content_id) {
        $this->db->where($this->tableName . '.status', 'active');
        $this->db->where($this->tableName . '.page_id', $content_id);
        $query = $this->db->get($this->tableName);
        $result = $query->row();
        return $result;
    }

    #============================== Get Page Record By Page Slug =========================================================#

    public function getContentRecordBySlug($slug) {
        $this->db->where($this->tableName . '.status', 'active');
        $this->db->where($this->tableName . '.slug', $slug);
        $query = $this->db->get($this->tableName);
        $result = $query->row();
        return $result;
    } 

}
?>
