<?php
class Blog_article_model extends CI_Model 
{
	function __construct()
	{
		parent::__construct();
	}

	public function blogArticleDetails(){
		$this->db->select('b_category.cat_name,b_article.*,sys_languages.name');
		$this->db->from('b_category');
		$this->db->from('b_article');
		$this->db->join('sys_languages','b_article.lang_id = sys_languages.id','left');
		$this->db->where('b_article.cat_id=b_category.cat_id');
		$this->db->where('b_article.lang_id',2);
		$this->db->order_by('display_order','ASC');
		$q = $this->db->get();
		//echo $this->db->last_query();die;
		return $q->result_array();
	}
}
