src/snac/server/database/SQL.php
/**
     * Get all sources for Constellation
     *
     * Returns the list of all sources for a given ic_id and version.
     *
     * @param int $mainID The IC id for the constellation
     * @param int $version The version number to get sources for
     * @return string[] An array of arrays of source data from the database
     */
Get all sources for Constellation
Returns the list of all sources for a given ic_id and version.

@param int $mainID The IC id for the constellation
@param int $version The version number to get sources for
@return string[] An array of arrays of source data from the database
Get all sources for Constellation Returns the list of all sources for a given ic_id and version . @param int $mainID The IC id for the constellation @param int $version The version number to get sources for @return string [] An array of arrays of source data from the database
public function selectSourceList($mainID, $version)
    {
        $qq = 'select_source_list';
        $this->sdb->prepare($qq,
                            'select aa.version, aa.ic_id, aa.id, aa.text, aa.note, aa.citation, aa.uri, aa.language_id, aa.display_name
                            from source as aa,
                            (select id,max(version) as version from source where ic_id=$1 and version<=$2 group by id) as bb
                            where not is_deleted and aa.id=bb.id and aa.version=bb.version');
        $result = $this->sdb->execute($qq, array($mainID, $version));
        $all = array();
        while($row = $this->sdb->fetchrow($result))
        {
            array_push($all, $row);
        }
        $this->sdb->deallocate($qq);
        return $all;
    }
public function selectSourceList ( $ mainID , $ version ) { $ qq = 'select_source_list' ; $ this -> sdb -> prepare ( $ qq , 'select aa.version, aa.ic_id, aa.id, aa.text, aa.note, aa.citation, aa.uri, aa.language_id, aa.display_name
                            from source as aa,
                            (select id,max(version) as version from source where ic_id=$1 and version<=$2 group by id) as bb
                            where not is_deleted and aa.id=bb.id and aa.version=bb.version' ) ; $ result = $ this -> sdb -> execute ( $ qq , array ( $ mainID , $ version ) ) ; $ all = array ( ) ; while ( $ row = $ this -> sdb -> fetchrow ( $ result ) ) { array_push ( $ all , $ row ) ; } $ this -> sdb -> deallocate ( $ qq ) ; return $ all ; }
Get all sources for Constellation
 Returns the list of all sources for a given ic_id and version.
Get all sources for Constellation Returns the list of all sources for a given ic_id and version .