src/snac/server/database/SQL.php
/**
     * Insert a activity record
     *
     * The SQL returns the inserted id which is used when inserting a date into table date_range. Activity
     * uses the same vocabulary terms as 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 integer $id Record id
     *
     * @param integer $type Activity type controlled vocab term id
     *
     * @param string $vocabularySource The vocabulary source
     *
     * @param string $note Note for this activity
     *
     * @param integer $term Activity term controlled vocab id
     *
     * @return integer id of this activity
     *
     */
Insert a activity record
The SQL returns the inserted id which is used when inserting a date into table date_range. Activity
uses the same vocabulary terms as 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 integer $id Record id

@param integer $type Activity type controlled vocab term id

@param string $vocabularySource The vocabulary source

@param string $note Note for this activity

@param integer $term Activity term controlled vocab id

@return integer id of this activity
Insert a activity record The SQL returns the inserted id which is used when inserting a date into table date_range . Activity uses the same vocabulary terms as 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 integer $id Record id @param integer $type Activity type controlled vocab term id @param string $vocabularySource The vocabulary source @param string $note Note for this activity @param integer $term Activity term controlled vocab id @return integer id of this activity
public function insertActivity($vhInfo, $id, $type, $vocabularySource, $note, $term)
    {
        if (! $id)
        {
            $id = $this->selectID();
        }
        $qq = 'insert_activity';
        $this->sdb->prepare($qq,
                            'insert into activity
                            (version, ic_id, id, activity_type, vocabulary_source, note, activity_id)
                            values
                            ($1, $2, $3, $4, $5, $6, $7)');
        $eArgs = array($vhInfo['version'],
                       $vhInfo['ic_id'],
                       $id,
                       $type,
                       $vocabularySource,
                       $note,
                       $term);
        $result = $this->sdb->execute($qq, $eArgs);
        $this->sdb->deallocate($qq);
        return $id;
    }
public function insertActivity ( $ vhInfo , $ id , $ type , $ vocabularySource , $ note , $ term ) { if ( ! $ id ) { $ id = $ this -> selectID ( ) ; } $ qq = 'insert_activity' ; $ this -> sdb -> prepare ( $ qq , 'insert into activity
                            (version, ic_id, id, activity_type, vocabulary_source, note, activity_id)
                            values
                            ($1, $2, $3, $4, $5, $6, $7)' ) ; $ eArgs = array ( $ vhInfo [ 'version' ] , $ vhInfo [ 'ic_id' ] , $ id , $ type , $ vocabularySource , $ note , $ term ) ; $ result = $ this -> sdb -> execute ( $ qq , $ eArgs ) ; $ this -> sdb -> deallocate ( $ qq ) ; return $ id ; }
Insert a activity record
 The SQL returns the inserted id which is used when inserting a date into table date_range.
Insert a activity record The SQL returns the inserted id which is used when inserting a date into table date_range .