View Single Post
  #14  
Old 08-28-2011, 01:36 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 627,372
Hall of Famer is on a distinguished road
Default

Guess I understand how family tree works now. The $mother or $father is the $parentid I was referring to. You can ignore the first step and modify the second step as:

PHP Code:
if(isset($mother)){
    
$query "SELECT * FROM {$prefix}owned_adoptables,  
                            
{$prefix}adoptables  WHERE {$prefix}owned_adoptables.mother = '{$mother}
                                                 AND 
{$prefix}adoptables.type = {$prefix}owned_adoptables.type 
                                                 ORDER BY 
{$prefix}owned_adoptables.aid";
    
$result runquery($query);
}
if(isset(
$father)){
    
$query "SELECT * FROM {$prefix}owned_adoptables,  
                            
{$prefix}adoptables  WHERE {$prefix}owned_adoptables.father = '{$father}
                                                 AND 
{$prefix}adoptables.type = {$prefix}owned_adoptables.type 
                                                 ORDER BY 
{$prefix}owned_adoptables.aid";
    
$result runquery($query);

It seems that you may need to either write a new script file or create a subpage for familytree.php to display an adoptables' children.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote