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

class Items extends CI_Model{
	
	public function Items_all(){
		$this->db->select('a.*');
		$this->db->where('a.companyID', element('compID', $this->session->userdata('logged_in')));
		$this->db->order_by('a.companyID');
		$this->db->from('item a');
		$query = $this->db->get();
		if($query->num_rows() >= 1){
			return $query->result();
		}else{
			return FALSE;
		}
	}
	
	public function Items_ID($ID){
		$this->db->where('ID', $ID);
		$this->db->order_by('itemCode');
		$this->db->from('item');
		$query = $this->db->get();
		if($query->num_rows() >= 1){
			return $query->result();
		}else{
			return FALSE;
		}
	}
	
}

/* End of file ItemDetails.php */
/* Location: ./application/models/ItemDetails.php */
/* Created By : Yahaya Abdollah */
