This snippet of code is suppose to get the names of the parents and show them. As it is now... it shows nothing. I can get it to show the id of the parents, but I'd like it to show their names.
Code:
$result = $adopts->select("owned_adoptables", array(), "aid='{$id}'");
while ($row = $result->fetchObject()) {
$father=$row->father;
$mother=$row->mother;
$getFather = $adopts->select("owned_adoptables", array(), "aid='{$father}'");
$getMother = $adopts->select("owned_adoptables", array(), "aid='{$mother}'");
$nFather = $row->getFather;
$nFather = $nFather['name'];
$nMother = $row->getMother;
$nMother = $nMother['name'];
if(empty($row->father)) {
$article_content .= '<b>Caught On:';
} else {
$article_content .= '<b>Laid On:';
}
$article_content .= "{$row->date}<br>";
if($father == '' && $nMother == '') {
$article_content .= '';
} else {
$article_content .= 'Father: ' . $nFather . '<br>
Mother: ' . $nMother . '<br>';
}
}