src/snac/server/database/SQL.php
/**
     * Insert a constellation occupation. If the $id arg is null, get a new id. Always return $id.
     *
     * @param string[] $vhInfo associative list with keys: version, ic_id
     *
     * @param int $id Record id occupation.id
     *
     * @param int $termID Vocabulary term foreign key id. Managed via Term objects in the calling code.
     *
     * @param string $vocabularySource Not currently saved. As far as we know, these are specific to
     * AnF. These probably should be somehow cross-walked to the SNAC vocabularies.
     *
     * @param string $note A note about the occupation.
     *
     */
Insert a constellation occupation. If the $id arg is null, get a new id. Always return $id.
@param string[] $vhInfo associative list with keys: version, ic_id



@param int $termID Vocabulary term foreign key id. Managed via Term objects in the calling code.

@param string $vocabularySource Not currently saved. As far as we know, these are specific to
AnF. These probably should be somehow cross-walked to the SNAC vocabularies.

@param string $note A note about the occupation.
Insert a constellation occupation . If the $id arg is null get a new id . Always return $id . @param string [] $vhInfo associative list with keys : version ic_id @param int $termID Vocabulary term foreign key id . Managed via Term objects in the calling code . @param string $vocabularySource Not currently saved . As far as we know these are specific to AnF . These probably should be somehow cross - walked to the SNAC vocabularies . @param string $note A note about the occupation .
public function insertOccupation($vhInfo, $id, $termID, $vocabularySource, $note)
    {
        if (! $id)
        {
            $id = $this->selectID();
        }
        $qq = 'insert_occupation';
        $this->sdb->prepare($qq,
                            'insert into occupation
                            (version, ic_id, id, occupation_id, vocabulary_source, note)
                            values
                            ($1, $2, $3, $4, $5, $6)');
        $result = $this->sdb->execute($qq,
                                      array($vhInfo['version'],
                                            $vhInfo['ic_id'],
                                            $id,
                                            $termID,
                                            $vocabularySource,
                                            $note));
        $this->sdb->deallocate($qq);
        return $id;
    }
public function insertOccupation ( $ vhInfo , $ id , $ termID , $ vocabularySource , $ note ) { if ( ! $ id ) { $ id = $ this -> selectID ( ) ; } $ qq = 'insert_occupation' ; $ this -> sdb -> prepare ( $ qq , 'insert into occupation
                            (version, ic_id, id, occupation_id, vocabulary_source, note)
                            values
                            ($1, $2, $3, $4, $5, $6)' ) ; $ result = $ this -> sdb -> execute ( $ qq , array ( $ vhInfo [ 'version' ] , $ vhInfo [ 'ic_id' ] , $ id , $ termID , $ vocabularySource , $ note ) ) ; $ this -> sdb -> deallocate ( $ qq ) ; return $ id ; }
Insert a constellation occupation.
Insert a constellation occupation .