<?php 
defined('BASEPATH') OR exit('No direct script access allowed');

class StaffUploadModel extends CI_Model { 

    public function __construct(){
		parent::__construct();
		$this->load->database();
	}

	function get_rows($where)
    {
		$sql = "select process_data_tb.*, 
		               site_tb.title as site, 
		               country_tb.title as country, 
		               admin_tb.name as staff 
				from process_data_tb
				left join site_tb on process_data_tb.site_id = site_tb.id
				left join country_tb on process_data_tb.country_id = country_tb.id
				left join admin_tb on process_data_tb.staff_id = admin_tb.id
		where process_data_tb.id > 0".$where;
		$query = $this->db->query($sql);
		return $query->result_array();
	}
}