Further to my previous post I have noticed a slight diffrence in the returned 
data from the service.

This object was returned by var_dump($o->getView_heatingByID(2));
and works.

object(stdClass)#4 (2) {
  ["heating_id"]=>
  int(2)
  ["heating_name"]=>
  string(12) "Radient Heat"
}

While this object was returned by var_dump($o->getView_heatingByName('Radient 
Heat')); 
and does not work?

object(stdClass)#3 (2) {
  ["heating_id"]=>
  int(2)
  ["heating_name"]=>
  string(12) "Radient Heat"
}

Whats going on here is my code...

public function getView_heatingByName($itemID) {
                
$stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename where 
heating_name=?");
$this->throwExceptionOnError();
                
mysqli_stmt_bind_param($stmt, 's', $itemID);            
$this->throwExceptionOnError();
                
mysqli_stmt_execute($stmt);
$this->throwExceptionOnError();
                
mysqli_stmt_bind_result($stmt, $row->heating_id, $row->heating_name);
                
if(mysqli_stmt_fetch($stmt)) {
return $row;
} else {
return null;
}

}

Reply via email to