<?php
class Articlebody extends CI_Model
{
	public function articlecontents()
	{
		$query =  $this->db
							->select(['title','id','body','slug'])
							->order_by("id", "asc")
							->from('articles')													
							->get();
		//print_r($query->result()); exit;
		return $query->result();

	} 	

	public function display_content($page_slug='index.php'){
			$listqry = $this->db
								->select('*')
								->order_by("id", "asc")
								->where('slug', $page_slug)
								->from('articles')													
								->get();

			return $listqry->result();	
								
			//$listqry->execute();

			$content = $listqry->fetch(PDO::FETCH_ASSOC);
			return $content;
		}

}
?>