src/snac/server/database/SQL.php
/**
     * Select resource origination name records
     *
     * Get all the origination name data for a given resource (id, version)
     *
     * @param int $resourceID The ID of the resource
     * @param int $version The version of the resource
     *
     * @return string[][] Return a list of lists. Inner list keys: id, version, name
     */
Select resource origination name records
Get all the origination name data for a given resource (id, version)

@param int $resourceID The ID of the resource
@param int $version The version of the resource

@return string[][] Return a list of lists. Inner list keys: id, version, name
Select resource origination name records Get all the origination name data for a given resource ( id version ) @param int $resourceID The ID of the resource @param int $version The version of the resource @return string [] [] Return a list of lists . Inner list keys : id version name
public function selectOriginationNames($resourceID, $version)
    {
        $qq = 'select_resource_origination_name';
        $query = 'select aa.version, aa.id, aa.name
        from resource_origination_name as aa,
        (select id,max(version) as version from resource_origination_name where resource_id=$1 and version<=$2 group by id) as bb
        where not is_deleted and aa.id=bb.id and aa.version=bb.version';
        $this->sdb->prepare($qq, $query);
        $result = $this->sdb->execute($qq,
                                      array($resourceID,
                                            $version));
        $all = array();
        while ($row = $this->sdb->fetchrow($result))
        {
            array_push($all, $row);
        }
        $this->sdb->deallocate($qq);
        return $all;
    }
public function selectOriginationNames ( $ resourceID , $ version ) { $ qq = 'select_resource_origination_name' ; $ query = 'select aa.version, aa.id, aa.name
        from resource_origination_name as aa,
        (select id,max(version) as version from resource_origination_name where resource_id=$1 and version<=$2 group by id) as bb
        where not is_deleted and aa.id=bb.id and aa.version=bb.version' ; $ this -> sdb -> prepare ( $ qq , $ query ) ; $ result = $ this -> sdb -> execute ( $ qq , array ( $ resourceID , $ version ) ) ; $ all = array ( ) ; while ( $ row = $ this -> sdb -> fetchrow ( $ result ) ) { array_push ( $ all , $ row ) ; } $ this -> sdb -> deallocate ( $ qq ) ; return $ all ; }
Select resource origination name records
 Get all the origination name data for a given resource (id, version)
Select resource origination name records Get all the origination name data for a given resource ( id version )