src/snac/server/database/SQL.php
/**
     * Get a set of 100 records
     *
     * Only return data (version, ic_id) that might be necessary for display
     * in the dashboard. Version and ic_id are sufficient to call selectConstellation(). The name is added
     * on the off chance that this could be used in some UI that needed a name displayed for the
     * constellation.
     *
     * Note: query() as opposed to prepare() and execute()
     *
     * @return string[] A list of 100 lists. Inner list keys are: 'version', 'ic_id', 'formatted_name'. At
     * this time 'formatted_name' is from table name.original
     */
Get a set of 100 records
Only return data (version, ic_id) that might be necessary for display
in the dashboard. Version and ic_id are sufficient to call selectConstellation(). The name is added
on the off chance that this could be used in some UI that needed a name displayed for the
constellation.

query() as opposed to prepare() and execute()

@return string[] A list of 100 lists.
Get a set of 100 records Only return data ( version ic_id ) that might be necessary for display in the dashboard . Version and ic_id are sufficient to call selectConstellation () . The name is added on the off chance that this could be used in some UI that needed a name displayed for the constellation . query () as opposed to prepare () and execute () @return string [] A list of 100 lists .
public function selectDemoRecs()
    {
        $sql =
            'select max(version) as version, id as ic_id
            from version_history
            where version_history.status <> $1
            group by id order by id limit 100';
        $result = $this->sdb->query($sql, array($this->deleted));
        $all = array();
        while($row = $this->sdb->fetchrow($result))
        {
            $nRow = $this->selectName(array('version' => $row['version'],
                                            'ic_id' => $row['ic_id']));
            if (count($nRow) == 0)
            {
                printf("\nError: SQL.php No names for version: %s ic_id: %s\n", $row['version'], $row['ic_id']);
            }
            $row['formatted_name'] = $nRow[0]['original'];
            array_push($all, $row);
        }
        return $all;
    }
public function selectDemoRecs ( ) { $ sql = 'select max(version) as version, id as ic_id
            from version_history
            where version_history.status <> $1
            group by id order by id limit 100' ; $ result = $ this -> sdb -> query ( $ sql , array ( $ this -> deleted ) ) ; $ all = array ( ) ; while ( $ row = $ this -> sdb -> fetchrow ( $ result ) ) { $ nRow = $ this -> selectName ( array ( 'version' => $ row [ 'version' ] , 'ic_id' => $ row [ 'ic_id' ] ) ) ; if ( count ( $ nRow ) == 0 ) { printf ( " \n Error: SQL.php No names for version: %s ic_id: %s \n " , $ row [ 'version' ] , $ row [ 'ic_id' ] ) ; } $ row [ 'formatted_name' ] = $ nRow [ 0 ] [ 'original' ] ; array_push ( $ all , $ row ) ; } return $ all ; }
Get a set of 100 records
 Only return data (version, ic_id) that might be necessary for display
 in the dashboard.
Get a set of 100 records Only return data ( version ic_id ) that might be necessary for display in the dashboard .
// Yikes, cannot have a constellation with zero names. /*
             * For now just use the first name returned, whatever that is. selectNameEntry() sorts by
             * preference_score, but that score might not be accurate for all contexts.
             */