<?php

class Items extends CI_Model
{
    public $itemcode;
    public $modelno;
    public $seriescode;
    public $item_desc;
    public $karat;
    public $size;
    public $sizeunit;
    public $grams;
    public $cts;
    public $mrp;
    public $prevsrp;
    public $srp;
    public $pic;
    public $manref;
    public $catCode;
    public $goldID;
    public $supCode;
    public $modifieddate;
    public $sourceDate;

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

        $this->load->database();
    }

    public function getItemInfoByModelNo($modelno)
    {
        $this->db->select("itemcode, modelno, seriescode, item_desc, karat, size, grams, cts, srp, pic, manref, catCode, goldID, supCode, modifieddate, sourceDate");
        return $this->db->get_where("items", array("modelno"=>$modelno));
    }

    public function getItemByModelNo($modelno)
    {
        $result = $this->db->get_where("items", array("modelno"=>$modelno));
        return $result->row();
    }
}