View Single Post
  #8  
Old 03-08-2016, 11:08 PM
tahbikat's Avatar
tahbikat tahbikat is offline
Member
 
Join Date: Feb 2014
Location: Louisiana
Posts: 408
Gender: Female
Credits: 68,293
tahbikat is on a distinguished road
Default

Okay, new question.

I wanted this primarily so that users could delete unwanted offspring their creatures happen to breed. I would also need the offspring's ID to be deleted (more like updated to NULL) from their parents' descendants column in owned_adopts. Is this possible? :c

Otherwise by just deleting the offspring's data, the parents' profile pages bring up an error since the child no longer exists. Also vice versa if a parent was deleted, its ID would need to be updated to NULL in the child's mother/father columns.

I'm using pretty much the exact coding that you and Abronsyth discussed in the Lineage thread.

EDIT: Would this work, or something like this?

PHP Code:
$mysidia->db->query("UPDATE adopts_pounds SET descendants = 'NULL' WHERE descendants = '{$this->adopt->getAdoptID()}'"); 
PHP Code:
$mysidia->db->query("UPDATE adopts_pounds SET mother = 'NULL' WHERE mother = '{$this->adopt->getAdoptID()}'"); 
PHP Code:
$mysidia->db->query("UPDATE adopts_pounds SET father = 'NULL' WHERE father = '{$this->adopt->getAdoptID()}'"); 

Last edited by tahbikat; 03-08-2016 at 11:50 PM.
Reply With Quote