src/Webtrees/Module/Sosa/Model/SosaProvider.php
public function deleteAncestors($sosa) {
        if(!$this->is_setup) return;
        $gen = Functions::getGeneration($sosa);
        Database::prepare(
            'DELETE FROM `##maj_sosa`'.
            ' WHERE majs_gedcom_id=:tree_id and majs_user_id = :user_id' .
            ' AND majs_gen >= :gen' .
            ' AND FLOOR(majs_sosa / (POW(2, (majs_gen - :gen)))) = :sosa'
        )->execute(array(
            'tree_id' => $this->tree->getTreeId(), 
            'user_id' => $this->user->getUserId(),
            'gen' => $gen,
            'sosa' => $sosa
        ));
    }
public function deleteAncestors($sosa) {
        if(!$this->is_setup) return;
        $gen = Functions::getGeneration($sosa);
        Database::prepare(
            'DELETE FROM `##maj_sosa`'.
            ' WHERE majs_gedcom_id=:tree_id and majs_user_id = :user_id' .
            ' AND majs_gen >= :gen' .
            ' AND FLOOR(majs_sosa / (POW(2, (majs_gen - :gen)))) = :sosa'
        )->execute(array(
            'tree_id' => $this->tree->getTreeId(), 
            'user_id' => $this->user->getUserId(),
            'gen' => $gen,
            'sosa' => $sosa
        ));
    }
public function deleteAncestors ( $ sosa ) { if ( ! $ this -> is_setup ) return ; $ gen = Functions :: getGeneration ( $ sosa ) ; Database :: prepare ( 'DELETE FROM `##maj_sosa`' . ' WHERE majs_gedcom_id=:tree_id and majs_user_id = :user_id' . ' AND majs_gen >= :gen' . ' AND FLOOR(majs_sosa / (POW(2, (majs_gen - :gen)))) = :sosa' ) -> execute ( array ( 'tree_id' => $ this -> tree -> getTreeId ( ) , 'user_id' => $ this -> user -> getUserId ( ) , 'gen' => $ gen , 'sosa' => $ sosa ) ) ; }
Remove all ancestors of a sosa number

@param int $sosa
Remove all ancestors of a sosa number