src/snac/server/database/SQL.php
/**
     * Current version by mainID
     *
     * The max, that is: current version for mainID regardless of status. This will return max for deleted as
     * well as all other status values. It is important that this return status on deleted records because
     * this function is crucial in getting the version number of records, deleted and otherwise. Ignores
     * status, and will return records which are deleted, or have any status.
     *
     * aka selectMaxVersion selectMostRecentVersion selectCurrentVersion
     *
     * @param integer $mainID The constellation ID
     *
     * @return integer Version number from version_history.version
     *
     */
Current version by mainID
The max, that is: current version for mainID regardless of status. This will return max for deleted as
well as all other status values. It is important that this return status on deleted records because
this function is crucial in getting the version number of records, deleted and otherwise. Ignores
status, and will return records which are deleted, or have any status.



@param integer $mainID The constellation ID

@return integer Version number from version_history.version
Current version by mainID The max that is : current version for mainID regardless of status . This will return max for deleted as well as all other status values . It is important that this return status on deleted records because this function is crucial in getting the version number of records deleted and otherwise . Ignores status and will return records which are deleted or have any status . @param integer $mainID The constellation ID @return integer Version number from version_history . version
public function selectCurrentVersion($mainID)
    {
        $result = $this->sdb->query(
                                    'select max(version) as version
                                    from version_history
                                    where version_history.id=$1',
                                    array($mainID));
        $row = $this->sdb->fetchrow($result);
        return $row['version'];
    }
public function selectCurrentVersion ( $ mainID ) { $ result = $ this -> sdb -> query ( 'select max(version) as version
                                    from version_history
                                    where version_history.id=$1' , array ( $ mainID ) ) ; $ row = $ this -> sdb -> fetchrow ( $ result ) ; return $ row [ 'version' ] ; }
Current version by mainID
 The max, that is: current version for mainID regardless of status.
Current version by mainID The max that is : current version for mainID regardless of status .