private function setStartingPageRecord($sDefaultPageNo, $iRecordsPerPage, $iAllRecords, $bKeepFullPage = true)
    {
        if (is_null($this->tCmnSuperGlobals->get('page'))) {
            switch ($sDefaultPageNo) {
                case 'last':
                    $iStartingPageRecord = $iAllRecords - $iRecordsPerPage;
                    break;
                case 'first':
                default:
                    $iStartingPageRecord = 0;
                    break;
            }
        } else {
            $iStartingPageRecord = ($this->tCmnSuperGlobals->get('page') - 1 ) * $iRecordsPerPage;
        }
        if (($bKeepFullPage ) && (($iStartingPageRecord + $iRecordsPerPage ) > $iAllRecords)) {
            $iStartingPageRecord = $iAllRecords - $iRecordsPerPage;
        }
        return max(0, $iStartingPageRecord);
    }
private function setStartingPageRecord($sDefaultPageNo, $iRecordsPerPage, $iAllRecords, $bKeepFullPage = true)
    {
        if (is_null($this->tCmnSuperGlobals->get('page'))) {
            switch ($sDefaultPageNo) {
                case 'last':
                    $iStartingPageRecord = $iAllRecords - $iRecordsPerPage;
                    break;
                case 'first':
                default:
                    $iStartingPageRecord = 0;
                    break;
            }
        } else {
            $iStartingPageRecord = ($this->tCmnSuperGlobals->get('page') - 1 ) * $iRecordsPerPage;
        }
        if (($bKeepFullPage ) && (($iStartingPageRecord + $iRecordsPerPage ) > $iAllRecords)) {
            $iStartingPageRecord = $iAllRecords - $iRecordsPerPage;
        }
        return max(0, $iStartingPageRecord);
    }
private function setStartingPageRecord ( $ sDefaultPageNo , $ iRecordsPerPage , $ iAllRecords , $ bKeepFullPage = true ) { if ( is_null ( $ this -> tCmnSuperGlobals -> get ( 'page' ) ) ) { switch ( $ sDefaultPageNo ) { case 'last' : $ iStartingPageRecord = $ iAllRecords - $ iRecordsPerPage ; break ; case 'first' : default : $ iStartingPageRecord = 0 ; break ; } } else { $ iStartingPageRecord = ( $ this -> tCmnSuperGlobals -> get ( 'page' ) - 1 ) * $ iRecordsPerPage ; } if ( ( $ bKeepFullPage ) && ( ( $ iStartingPageRecord + $ iRecordsPerPage ) > $ iAllRecords ) ) { $ iStartingPageRecord = $ iAllRecords - $ iRecordsPerPage ; } return max ( 0 , $ iStartingPageRecord ) ; }
Returns starting records for LIMIT clause on SQL interrogation

@version 20080521
@param string $sDefaultPageNo
@param int $iRecordsPerPage
@param int $iAllRecords
@param boolean $bKeepFullPage
@return int
Returns starting records for LIMIT clause on SQL interrogation