src/snac/server/database/SQL.php
/**
     * Insert an address line
     *
     * Related to place where component.place_id=place.id. This is a one-sided fk relationship also used for
     * date and language.
     *
     * @throws \snac\exceptions\SNACDatabaseException
     *
     * @param string[] $vhInfo associative list with keys: version, main_id
     *
     * @param integer $id Record id of this address line. If null one will be minted. The id (existing or new) is always returned.
     *
     * @param integer $placeID Record id of related place
     *
     * @param string $text Text of the address line
     *
     * @param integer $typeID Vocabulary fk id of the type of this address line.
     * @param integer $order The ordering of this line in the place's address
     *
     * @return integer $id Return the existing id, or the newly minted id.
     */




@param string[] $vhInfo associative list with keys: version, main_id

@param integer $id Record id of this address line. If null one will be minted. The id (existing or new) is always returned.

@param integer $placeID Record id of related place

@param string $text Text of the address line

@param integer $typeID Vocabulary fk id of the type of this address line.
@param integer $order The ordering of this line in the place's address

@return integer $id Return the existing id, or the newly minted id.
@param string [] $vhInfo associative list with keys : version main_id @param integer $id Record id of this address line . If null one will be minted . The id ( existing or new ) is always returned . @param integer $placeID Record id of related place @param string $text Text of the address line @param integer $typeID Vocabulary fk id of the type of this address line . @param integer $order The ordering of this line in the place ' s address @return integer $id Return the existing id or the newly minted id .
public function insertAddressLine($vhInfo, $id, $placeID, $text, $typeID, $order)
    {
        if ($placeID == null)
        {
            throw new \snac\exceptions\SNACDatabaseException("Tried to write an address line for a non-existant place");
        }
        if (! $id)
        {
            $id = $this->selectID();
        }
        $qq_2 = 'insert_address_line';
        $this->sdb->prepare($qq_2,
                            'insert into address_line
                            (ic_id, version, id, place_id, value, label, line_order)
                            values
                            ($1, $2, $3, $4, $5, $6, $7)');
        $this->sdb->execute($qq_2,
                            array($vhInfo['ic_id'],
                                  $vhInfo['version'],
                                  $id,
                                  $placeID,
                                  $text,
                                  $typeID,
                                  $order));
        $this->sdb->deallocate($qq_2);
        return $id;
    }
public function insertAddressLine ( $ vhInfo , $ id , $ placeID , $ text , $ typeID , $ order ) { if ( $ placeID == null ) { throw new \ snac \ exceptions \ SNACDatabaseException ( " Tried to write an address line for a non-existant place " ) ; } if ( ! $ id ) { $ id = $ this -> selectID ( ) ; } $ qq_2 = 'insert_address_line' ; $ this -> sdb -> prepare ( $ qq_2 , 'insert into address_line
                            (ic_id, version, id, place_id, value, label, line_order)
                            values
                            ($1, $2, $3, $4, $5, $6, $7)' ) ; $ this -> sdb -> execute ( $ qq_2 , array ( $ vhInfo [ 'ic_id' ] , $ vhInfo [ 'version' ] , $ id , $ placeID , $ text , $ typeID , $ order ) ) ; $ this -> sdb -> deallocate ( $ qq_2 ) ; return $ id ; }
Insert an address line
 Related to place where component.place_id=place.id.
Insert an address line Related to place where component . place_id = place . id .