No, partially because editting the adopts_pounds table won't help you, lol?
The babies are stored as an psuedo-array with the parents. You have to take the adopt, identify its parents, extract the arrays from the database for each parent, explode these arrays from a strings into an an actual arrays PHP can work with, carefully remove the id of the pet you're deleting, implode it back into a string, and reinsert it into the database.
Confirmed working (
edit: Updated Mar 9 @ 2:21AM EST!):
PHP Code:
/* . . . REMOVE PET FROM FATHER'S LIST OF CHILDREN . . . */
# Find the father.
$father = new OwnedAdoptable($this->adopt->father);
# Open the array of the father's kids.
$father_kids = explode(",", $father->offsprings);
# Remove specific adoptable from the list of kids.
foreach($father_kids as $i => $kid){
if($kid == $this->adopt->getAdoptID()){
unset($father_kids[$i]);
}
}
# Close the array of the father's kids.
$father_kids = implode(",",$father_kids);
# Put the updated list of kids back in the database.
$mysidia->db->update("owned_adoptables", array("offsprings" => $father_kids), "aid = '{$father->aid}'");
/* . . . REMOVE PET FROM MOTHER'S LIST OF CHILDREN . . . */
# Find the mother.
$mother = new OwnedAdoptable($this->adopt->mother);
# Open the array of the mother's kids.
$mother_kids = explode(",", $mother->offsprings);
# Remove specific adoptable from the list of kids.
foreach($mother_kids as $i => $kid){
if($kid == $this->adopt->getAdoptID()){
unset($mother_kids[$i]);
}
}
# Close the array of the mother's kids.
$mother_kids = implode(",",$mother_kids);
# Put the updated list of kids back in the database.
$mysidia->db->update("owned_adoptables", array("offsprings" => $mother_kids), "aid = '{$mother->aid}'");
Snuggle the above code directly up to (and probably right before) where the pet itself is deleted.