src/Data/BizDataObj_Lite.php
public function fetchRecords($searchRule, &$resultRecords, $count = -1, $offset = 0, $clearSearchRule = true, $noAssociation = false)
    {
        if ($count == 0)
            return;
        $curRecord = $this->currentRecord;
        $recId = $this->recordId;
        $oldSearchRule = $this->searchRule;
        $this->currentRecord = null;
        if ($clearSearchRule)
            $this->clearSearchRule();
        $this->setSearchRule($searchRule);
        if ($noAssociation) {
            $oldAssociation = $this->association;
            $this->association = null;
        }
        $limit = ($count == -1) ? null : array('count' => $count, 'offset' => $offset);

        $resultRecords = array();

        $resultSet = $this->_run_search($limit);
        if ($resultSet !== null) {
            while ($recArray = $this->_fetch_record($resultSet)) {
                $resultRecords[] = $recArray;
            }
        }
        if ($noAssociation) {
            $this->association = $oldAssociation;
        }
        $this->searchRule = $oldSearchRule;
        $this->currentRecord = $curRecord;
        $this->recordId = $recId;
        return true;
    }
public function fetchRecords($searchRule, &$resultRecords, $count = -1, $offset = 0, $clearSearchRule = true, $noAssociation = false)
    {
        if ($count == 0)
            return;
        $curRecord = $this->currentRecord;
        $recId = $this->recordId;
        $oldSearchRule = $this->searchRule;
        $this->currentRecord = null;
        if ($clearSearchRule)
            $this->clearSearchRule();
        $this->setSearchRule($searchRule);
        if ($noAssociation) {
            $oldAssociation = $this->association;
            $this->association = null;
        }
        $limit = ($count == -1) ? null : array('count' => $count, 'offset' => $offset);

        $resultRecords = array();

        $resultSet = $this->_run_search($limit);
        if ($resultSet !== null) {
            while ($recArray = $this->_fetch_record($resultSet)) {
                $resultRecords[] = $recArray;
            }
        }
        if ($noAssociation) {
            $this->association = $oldAssociation;
        }
        $this->searchRule = $oldSearchRule;
        $this->currentRecord = $curRecord;
        $this->recordId = $recId;
        return true;
    }
Run query and get the query results without affecting DataObject internal state
by default it gets number of records starting from the first row.
if pageNum > 0, it gets number of records starting from the first row of the page

@param $searchRule search rule applied on the query
@param $resultRecord returned result record array
@param $recNum number of records to be returned. if -1, all query results returned
@param $clearSearchRule indicates if search rule need to be cleared before query
@param $noAssociation indicates if current association condition is not used in query
@return boolean - if return false, the caller can call GetErrorMessage to get the error.

@todo Why use parameter as result, fetch word mean the function return value by return keyword.
Need to change parameter and result methodology.