Oh! Okay, then you would first get the species of the user's adopt with this:
Quote:
$aid = $this->getField("aid")->getValue();
$adopt = new OwnedAdoptable($aid);
$type = $adopt->getType();
|
If you're using the manage function in myadoptsview.php. Then from there it depends on how the traits are stored. If they have their own separate columns in the database then you could do something like:
Quote:
if($type = "insertspecieshere"){
$trait1 = $mysidia->db->select("adoptables", array("yourtrait"), "type = '{$type}'")->fetchColumn();
}
|
This is assuming that, in the prefix_adoptables table, each trait is a seperate column and not all bunched into one column. Then, depending on the species, the first trait will be changed accordingly. Then to show the trait to the user you could do this:
Quote:
$document->add(new Comment("Traits: {$trait1}, {$trait2}, etc..."));
|