<?php


class Staff_model extends CI_Model
{
    public function getStaffRowData($id)
	{
        $query = $this->db
        ->select('t1.*,t2.name as country_name,t3.name as state_name,t4.name as city_name')
        ->from('staff t1')
        ->join('countries t2', 't2.id = t1.country','left') 
        ->join('states t3', 't3.id = t1.state','left') 
        ->join('cities t4', 't4.id = t1.city','left') 
        ->where(['t1.id'=>$id])
        ->order_by('t1.id','DESC')
        ->get();
		return $query->row_array();
	}
	
}

?>