I did not look much into the detail, but it seems that there's something wrong with this line:
PHP Code:
$mysidia->db->update("owned_adoptables", array("owner" => '{$user}',"selling" => 'no'), "aid ='$adopt->aid'");
which should be:
PHP Code:
$mysidia->db->update("owned_adoptables", array("owner" => $user, "selling" => 'no'), "aid ='{$adopt->aid}'");