public function execute($innerQuery, $bind = array())
    {
        $query = $this->generateRankingQuery($innerQuery);
        $data  = Db::fetchAll($query, $bind);

        if ($this->columnToMarkExcludedRows !== false) {
            // split the result into the regular result and the rows with special treatment
            $excludedFromLimit = array();
            $result = array();
            foreach ($data as &$row) {
                if ($row[$this->columnToMarkExcludedRows] != 0) {
                    $excludedFromLimit[] = $row;
                } else {
                    $result[] = $row;
                }
            }
            $data = array(
                'result'            => &$result,
                'excludedFromLimit' => &$excludedFromLimit
            );
        }

        if ($this->partitionColumn !== false) {
            if ($this->columnToMarkExcludedRows !== false) {
                $data['result'] = $this->splitPartitions($data['result']);
            } else {
                $data = $this->splitPartitions($data);
            }
        }

        return $data;
    }
public function execute($innerQuery, $bind = array())
    {
        $query = $this->generateRankingQuery($innerQuery);
        $data  = Db::fetchAll($query, $bind);

        if ($this->columnToMarkExcludedRows !== false) {
            // split the result into the regular result and the rows with special treatment
            $excludedFromLimit = array();
            $result = array();
            foreach ($data as &$row) {
                if ($row[$this->columnToMarkExcludedRows] != 0) {
                    $excludedFromLimit[] = $row;
                } else {
                    $result[] = $row;
                }
            }
            $data = array(
                'result'            => &$result,
                'excludedFromLimit' => &$excludedFromLimit
            );
        }

        if ($this->partitionColumn !== false) {
            if ($this->columnToMarkExcludedRows !== false) {
                $data['result'] = $this->splitPartitions($data['result']);
            } else {
                $data = $this->splitPartitions($data);
            }
        }

        return $data;
    }
public function execute ( $ innerQuery , $ bind = array ( ) ) { $ query = $ this -> generateRankingQuery ( $ innerQuery ) ; $ data = Db :: fetchAll ( $ query , $ bind ) ; if ( $ this -> columnToMarkExcludedRows !== false ) { // split the result into the regular result and the rows with special treatment $ excludedFromLimit = array ( ) ; $ result = array ( ) ; foreach ( $ data as & $ row ) { if ( $ row [ $ this -> columnToMarkExcludedRows ] != 0 ) { $ excludedFromLimit [ ] = $ row ; } else { $ result [ ] = $ row ; } } $ data = array ( 'result' => & $ result , 'excludedFromLimit' => & $ excludedFromLimit ) ; } if ( $ this -> partitionColumn !== false ) { if ( $ this -> columnToMarkExcludedRows !== false ) { $ data [ 'result' ] = $ this -> splitPartitions ( $ data [ 'result' ] ) ; } else { $ data = $ this -> splitPartitions ( $ data ) ; } } return $ data ; }
Executes the query.
The object has to be configured first using the other methods.

@param $innerQuery string  The "payload" query that does the actual data aggregation. The ordering
has to be specified in this query. {@link RankingQuery} cannot apply ordering
itself.
@param $bind array         Bindings for the inner query.
@return array              The format depends on which methods have been used
to configure the ranking query.
Executes the query . The object has to be configured first using the other methods .