src/snac/server/database/SQL.php
/**
     * Insert into table related_resource
     *
     * Use data from php ResourceRelation object. It is assumed that the calling code in DBUtils knows the php
     * to sql fields. Note keys in $argList have a fixed order.
     *
     * @param string[] $vhInfo associative list with keys: version, ic_id
     * @param int $resourceID The resource ID for this relation
     * @param int $resourceVersion The version of the resource
     * @param integer $arcRole Vocabulary id value of the arc role aka xlink:arcrole
     * @param string $relationEntry Often the name of the relation aka relationEntry
     * @param string $note A note aka descriptiveNote
     * @param integer $id The database record id (if null, one will be created
     *
     * @return integer $id The record id, which might be new if this is the first insert for this resource relation.
     *
     */
Insert into table related_resource
Use data from php ResourceRelation object. It is assumed that the calling code in DBUtils knows the php
to sql fields. Note keys in $argList have a fixed order.



@return integer $id The record id, which might be new if this is the first insert for this resource relation.
Insert into table related_resource Use data from php ResourceRelation object . It is assumed that the calling code in DBUtils knows the php to sql fields . Note keys in $argList have a fixed order . @return integer $id The record id which might be new if this is the first insert for this resource relation .
public function insertResourceRelation($vhInfo,
                                           $resourceID,
                                           $resourceVersion,
                                           $arcRole,  
                                           $relationEntry, 
                                           $note, 
                                           $id)
    {
        if (! $id)
        {
            $id = $this->selectID();
        }
        $qq = 'insert_resource_relation';
        $this->sdb->prepare($qq,
                            'insert into related_resource
                            (version, ic_id, id, resource_id, resource_version, arcrole, relation_entry, descriptive_note)
                            values
                            ($1, $2, $3, $4, $5, $6, $7, $8)');
        $execList = array($vhInfo['version'], 
                          $vhInfo['ic_id'],   
                          $id,                
                          $resourceID,        
                          $resourceVersion,   
                          $arcRole,           
                          $relationEntry,     
                          $note);             
        $this->sdb->execute($qq, $execList);
        $this->sdb->deallocate($qq);
        return $id;
    }
public function insertResourceRelation ( $ vhInfo , $ resourceID , $ resourceVersion , $ arcRole , $ relationEntry , $ note , $ id ) { if ( ! $ id ) { $ id = $ this -> selectID ( ) ; } $ qq = 'insert_resource_relation' ; $ this -> sdb -> prepare ( $ qq , 'insert into related_resource
                            (version, ic_id, id, resource_id, resource_version, arcrole, relation_entry, descriptive_note)
                            values
                            ($1, $2, $3, $4, $5, $6, $7, $8)' ) ; $ execList = array ( $ vhInfo [ 'version' ] , $ vhInfo [ 'ic_id' ] , $ id , $ resourceID , $ resourceVersion , $ arcRole , $ relationEntry , $ note ) ; $ this -> sdb -> execute ( $ qq , $ execList ) ; $ this -> sdb -> deallocate ( $ qq ) ; return $ id ; }
Insert into table related_resource
 Use data from php ResourceRelation object.
Insert into table related_resource Use data from php ResourceRelation object .
// xlink:arcrole // relationEntry // descriptiveNote /*
         * Combine vhInfo and the remaining args into a big array for execute().
         */ // 1 // 2 // 3 // 4 // 5 // 6 // 7 // 8