'GET request received']; $this->response($data, 200); } public function itemModel_get($modelno) { $this->load->model("Items"); $result = $this->Items->getItemInfoByModelNo('GE-4558'); // disabled during testing //$result = $this->Items->getItemInfoByModelNo($modelno); $itemcount = $result->num_rows(); if($itemcount > 0) { $row = $result->row(); $item = [ 'itemcode' => $row->itemcode, 'modelno' => $row->modelno, 'item_desc' => $row->item_desc, 'srp' => $row->srp, 'catCode' => $row->catCode, 'goldID' => $row->goldID ]; $data = ['status' => 'FOUND', 'item_count' => $itemcount, 'data' => $item]; } else $data = ['status' => 'NOTFOUND', 'item_count' => 0, 'data' => null]; $this->response($data, 200); } }