class News_model extends CI_Model {
public function __construct()
{
$this->load->database();
}
public function get_news_page($slug = FALSE)
{
$query = $this->db->get_where('news', array('slug' => $slug));
return $query->row_array();
}
public function get_news_front($num,$offset)
{
$this->db->order_by('id','desc');
$query = $this->db->get('news',$num,$offset);
return $query->result_array();
}
}