<?php
class Mctr extends Model
{
	function Mctr()
	{
		parent::Model();
	}

    function index()
	{
		redirect('');
	}

	function get_all_ctr($order = 'ctrNameEng')
	{
		$query = $this->db->order_by($order,'ASC')->get('countries');
		if($query->num_rows()==0)
		{
			return false;
		}
		else
		{
			return $query->result();
		}
	}
	
	function get_ctr_name($ctrID, $lang = 'Eng')
	{
		$query = $this->db->select('ctrName'.$lang)->where('ctrID',$ctrID)->get('countries');
		if($query->num_rows()==0)
		{
			return false;
		}
		else
		{
			return $query->row();
		}
	}
}
?>