<?php
class Cunitsmodel extends CI_Model {

	var $id;
	var	$dmo_id = "";
	var	$type = "";
	var	$unit="";
	var	$min;
	var	$max;
	var	$step;
	var	$value;

	function __construct()
    {
        parent::__construct();
	}

	function get($condition="")
   {
        if(!empty($condition))
		   $this->db->where($condition);
        return $this->db->get('cross_industry_units');
    }

	
	function update($data,$where){
		return $this->db->update('cross_industry_units',$data,$where);
	}

    function insert($obj)
    {       
		$this->dmo_id = $obj['dmo_id'];
		$this->type = $obj['type'];
		$this->unit=$obj['unit'];
		$this->min=$obj['min'];
		$this->max = $obj['max'];
		$this->step = $obj['step'];
		$this->value =$obj['value'];
		return $this->db->insert('cross_industry_units',$this);
	}
	
}