public function load($id) { $db = new Database(); $query = "select * from `itm_products` where (id = {$id})"; //echo $query;//####This is to be commented $result = $db->execute_query_return_result($query); $rp = new Result_processor(); $fields = array('id', 'name', 'description', 'unit'); $arr = $rp->get_array_of($result, $fields); $this->id = $id; $this->name = $arr[0]['name']; $this->description = $arr[0]['description']; $this->unit = $arr[0]['unit']; //echo $this->id." ".$this->name; }