private function appendPaginationInfo($query, $startPosition, $maxResults){
       $query = trim($query);
       if(isset($startPosition) && !empty($startPosition)){
           if(stripos($query, "STARTPOSITION") === false){
              if(stripos($query, "MAXRESULTS") !== false){
                //In MaxResult is defined,we don't set startPosition
              }else{
                $query = $query . " " . "STARTPOSITION " . $startPosition;
              }
           }else{
             //Ignore the startPosition if it is already used on the query
           }
       }

       if(isset($maxResults) && !empty($maxResults)){
           if(stripos($query, "MAXRESULTS") === false){
                $query = $query . " " . "MAXRESULTS " . $maxResults;
           }else{
             //Ignore the maxResults if it is already used on the query
           }
       }

       return $query;

    }
private function appendPaginationInfo($query, $startPosition, $maxResults){
       $query = trim($query);
       if(isset($startPosition) && !empty($startPosition)){
           if(stripos($query, "STARTPOSITION") === false){
              if(stripos($query, "MAXRESULTS") !== false){
                //In MaxResult is defined,we don't set startPosition
              }else{
                $query = $query . " " . "STARTPOSITION " . $startPosition;
              }
           }else{
             //Ignore the startPosition if it is already used on the query
           }
       }

       if(isset($maxResults) && !empty($maxResults)){
           if(stripos($query, "MAXRESULTS") === false){
                $query = $query . " " . "MAXRESULTS " . $maxResults;
           }else{
             //Ignore the maxResults if it is already used on the query
           }
       }

       return $query;

    }
private function appendPaginationInfo ( $ query , $ startPosition , $ maxResults ) { $ query = trim ( $ query ) ; if ( isset ( $ startPosition ) && ! empty ( $ startPosition ) ) { if ( stripos ( $ query , "STARTPOSITION" ) === false ) { if ( stripos ( $ query , "MAXRESULTS" ) !== false ) { //In MaxResult is defined,we don't set startPosition } else { $ query = $ query . " " . "STARTPOSITION " . $ startPosition ; } } else { //Ignore the startPosition if it is already used on the query } } if ( isset ( $ maxResults ) && ! empty ( $ maxResults ) ) { if ( stripos ( $ query , "MAXRESULTS" ) === false ) { $ query = $ query . " " . "MAXRESULTS " . $ maxResults ; } else { //Ignore the maxResults if it is already used on the query } } return $ query ; }
Append the Pagination Data to the Query string if it is not appended
@param Integer StartPostion
@param Integer MaxResults
@return String The query string
Append the Pagination Data to the Query string if it is not appended