src/snac/server/database/SQL.php
/**
     * select Current IC_IDs by IC_ID
     *
     * Returns the current IC ic_id (main_id in Tom's code) for the given ic_id.  If the constellation pointed
     * to by the given ic_id was merged, this will return the the ic_id for the good, merged record (NOT the tombstoned version).
     * If the ic was split, it will return a list of ic_ids relating to the split.
     *
     * @param integer $icid The Constellation ID of the IC to lookup
     * @return integer[] The constellation IDs aka mainIDs akd ic_ids aka version_history.ids.
     */
select Current IC_IDs by IC_ID
Returns the current IC ic_id (main_id in Tom's code) for the given ic_id.  If the constellation pointed
to by the given ic_id was merged, this will return the the ic_id for the good, merged record (NOT the tombstoned version).
If the ic was split, it will return a list of ic_ids relating to the split.

@param integer $icid The Constellation ID of the IC to lookup
@return integer[] The constellation IDs aka mainIDs akd ic_ids aka version_history.ids.
select Current IC_IDs by IC_ID Returns the current IC ic_id ( main_id in Tom ' s code ) for the given ic_id . If the constellation pointed to by the given ic_id was merged this will return the the ic_id for the good merged record ( NOT the tombstoned version ) . If the ic was split it will return a list of ic_ids relating to the split . @param integer $icid The Constellation ID of the IC to lookup @return integer [] The constellation IDs aka mainIDs akd ic_ids aka version_history . ids .
public function selectCurrentMainIDsForID($icid)
    {
        $result = $this->sdb->query(
            'select current_ic_id
            from constellation_lookup
            where
            ic_id=$1',
            array($icid));
        $all = array();
        while ($row = $this->sdb->fetchrow($result)) {
            array_push($all, $row['current_ic_id']);
        }
        return $all;
    }
public function selectCurrentMainIDsForID ( $ icid ) { $ result = $ this -> sdb -> query ( 'select current_ic_id
            from constellation_lookup
            where
            ic_id=$1' , array ( $ icid ) ) ; $ all = array ( ) ; while ( $ row = $ this -> sdb -> fetchrow ( $ result ) ) { array_push ( $ all , $ row [ 'current_ic_id' ] ) ; } return $ all ; }
select Current IC_IDs by IC_ID
 Returns the current IC ic_id (main_id in Tom's code) for the given ic_id.
select Current IC_IDs by IC_ID Returns the current IC ic_id ( main_id in Tom ' s code ) for the given ic_id .