src/snac/server/database/SQL.php
/**
     * Select a list of address line records
     *
     * Select all related address line records and return a list of associated lists. This is a one-sided fk
     * relationship also used for data such as date and language. Related to name where
     * address_line.place_id=place.id.
     *
     * @param integer $placeID Record id of related place.
     *
     * @param inteter $version Version number.
     *
     * @return string[][] Return a list of associated lists, where each inner list is a single address line.
     */
Select a list of address line records
Select all related address line records and return a list of associated lists. This is a one-sided fk
relationship also used for data such as date and language.

@param integer $placeID Record id of related place.

@param inteter $version Version number.

@return string[][] Return a list of associated lists, where each inner list is a single address line.
Select a list of address line records Select all related address line records and return a list of associated lists . This is a one - sided fk relationship also used for data such as date and language . @param integer $placeID Record id of related place . @param inteter $version Version number . @return string [] [] Return a list of associated lists where each inner list is a single address line .
public function selectAddress($placeID, $version)
    {
        $qq_2 = 'select_address';
        $this->sdb->prepare($qq_2,
                            'select
                            aa.id, aa.place_id, aa.version, aa.label, aa.value, aa.line_order
                            from address_line as aa,
                            (select place_id,max(version) as version from address_line
                                where place_id=$1 and version<=$2 group by place_id) as bb
                            where not is_deleted and aa.place_id=bb.place_id and aa.version=bb.version
                            order by aa.line_order asc');
        $result = $this->sdb->execute($qq_2, array($placeID, $version));
        $all = array();
        while($row = $this->sdb->fetchrow($result))
        {
            array_push($all, $row);
        }
        $this->sdb->deallocate($qq_2);
        return $all;
    }
public function selectAddress ( $ placeID , $ version ) { $ qq_2 = 'select_address' ; $ this -> sdb -> prepare ( $ qq_2 , 'select
                            aa.id, aa.place_id, aa.version, aa.label, aa.value, aa.line_order
                            from address_line as aa,
                            (select place_id,max(version) as version from address_line
                                where place_id=$1 and version<=$2 group by place_id) as bb
                            where not is_deleted and aa.place_id=bb.place_id and aa.version=bb.version
                            order by aa.line_order asc' ) ; $ result = $ this -> sdb -> execute ( $ qq_2 , array ( $ placeID , $ version ) ) ; $ all = array ( ) ; while ( $ row = $ this -> sdb -> fetchrow ( $ result ) ) { array_push ( $ all , $ row ) ; } $ this -> sdb -> deallocate ( $ qq_2 ) ; return $ all ; }
Select a list of address line records
 Select all related address line records and return a list of associated lists.
Select a list of address line records Select all related address line records and return a list of associated lists .