src/snac/server/database/SQL.php
/**
     * Select resource origination name records by list
     *
     * Get all the origination name data for a given list of resources
     *
     * TODO: This should take into account versioning
     *
     * @param int[] $resourceIDs The list of resource ids
     *
     * @return string[][] Return a list of lists. Inner list keys: id, version, name
     */
Select resource origination name records by list
Get all the origination name data for a given list of resources

This should take into account versioning

@param int[] $resourceIDs The list of resource ids

@return string[][] Return a list of lists. Inner list keys: id, version, name
Select resource origination name records by list Get all the origination name data for a given list of resources This should take into account versioning @param int [] $resourceIDs The list of resource ids @return string [] [] Return a list of lists . Inner list keys : id version name
public function selectOriginationNamesByList($resourceIDs)
    {
        if (count($resourceIDs) === 0)
            return array();
        $countList = array();
        for ($i = 1; $i <= count($resourceIDs); $i++) {
            $countList[$i] = '$'.$i;
        }
        $resourceIDList = implode(",", $countList);
        $qq = 'select_resource_origination_name';
        $query = 'select aa.version, aa.resource_id, aa.id, aa.name
        from resource_origination_name as aa
        where aa.resource_id in ('.$resourceIDList.') and not aa.is_deleted';
        $this->sdb->prepare($qq, $query);
        $result = $this->sdb->execute($qq,
                                      $resourceIDs);
        $all = array();
        while ($row = $this->sdb->fetchrow($result))
        {
            array_push($all, $row);
        }
        $this->sdb->deallocate($qq);
        return $all;
    }
public function selectOriginationNamesByList ( $ resourceIDs ) { if ( count ( $ resourceIDs ) === 0 ) return array ( ) ; $ countList = array ( ) ; for ( $ i = 1 ; $ i <= count ( $ resourceIDs ) ; $ i ++ ) { $ countList [ $ i ] = '$' . $ i ; } $ resourceIDList = implode ( " , " , $ countList ) ; $ qq = 'select_resource_origination_name' ; $ query = 'select aa.version, aa.resource_id, aa.id, aa.name
        from resource_origination_name as aa
        where aa.resource_id in (' . $ resourceIDList . ') and not aa.is_deleted' ; $ this -> sdb -> prepare ( $ qq , $ query ) ; $ result = $ this -> sdb -> execute ( $ qq , $ resourceIDs ) ; $ all = array ( ) ; while ( $ row = $ this -> sdb -> fetchrow ( $ result ) ) { array_push ( $ all , $ row ) ; } $ this -> sdb -> deallocate ( $ qq ) ; return $ all ; }
Select resource origination name records by list
 Get all the origination name data for a given list of resources
Select resource origination name records by list Get all the origination name data for a given list of resources