I have the following problem:
public function row2Partner($row){
echo $row->PartnerID;
}
public function main(){
$query = "SELECT PartnerID, PartnerName FROM Partner";
$result = mysql_query($query);
$this->row2Partner(mysql_fetch_object($result));
}
This gives me the error in row2Partner()
:
Trying to get property of non-object
But $row
is an Object! And if I do
echo $row->PartnerID
in the main function, it works.
Any ideas?
Thx, Martin