Bonus code!
Want to show more generations on a pet's page? Easy! Since we already call the parent in a manner that let's us call their information, we can readily do this;
PHP Code:
$maternalgma = $mother->mother;
Want to readily call the maternal grandmother's data? Also easy!
PHP Code:
if ($mother->mother != NULL) { $matgrandmother = new OwnedAdoptable($mother->mother); $gp1name = $matgrandmother->name; $gp1id = $matgrandmother->aid; } else { $gp1name = "Unkown"; }
Now you can summon the maternal grandmother's data like so;
(
maternal
grand
mother's
mother)
PHP Code:
$mgmm = $matgrandmother->mother;
And so on! ...I have not tested this quite yet, but it ought to work!
So you can create obnoxiously long pedigrees