public function directFetch($searchRule = "", $count = -1, $offset = 0, $sortRule = "")
    {
     
        //Openbizx::$app->getClientProxy()->showClientAlert(__METHOD__ .'-'. __LINE__ . ' msg: $searchRule : '.$searchRule);
        
        $curRecord = $this->currentRecord;
        $recId = $this->recordId;
        $this->currentRecord = null;

        $oldSearchRule = $this->searchRule;
        $this->clearSearchRule();
        $this->setSearchRule($searchRule);

        $oldSortRule = $this->sortRule;
        $this->clearSortRule();
        if ($sortRule) {
            $this->setSortRule($sortRule);
        } else {
            $this->setSortRule($this->sortRule);
        }

        $limit = ($count == -1) ? null : array('count' => $count, 'offset' => $offset);

        $dataSet = new DataSet($this);
        $resultSet = $this->_run_search($limit);
        if ($resultSet !== null) {
            $i = 0;
            while ($recArray = $this->_fetch_record($resultSet)) {
                $dataSet[$i++] = $recArray;
            }
        }

        $this->sortRule = $oldSortRule;
        $this->searchRule = $oldSearchRule;
        $this->currentRecord = $curRecord;
        $this->recordId = $recId;

        if (count($dataSet) == 0) {
            return new DataSet(null);
        }
        return $dataSet;
    }
public function directFetch($searchRule = "", $count = -1, $offset = 0, $sortRule = "")
    {
     
        //Openbizx::$app->getClientProxy()->showClientAlert(__METHOD__ .'-'. __LINE__ . ' msg: $searchRule : '.$searchRule);
        
        $curRecord = $this->currentRecord;
        $recId = $this->recordId;
        $this->currentRecord = null;

        $oldSearchRule = $this->searchRule;
        $this->clearSearchRule();
        $this->setSearchRule($searchRule);

        $oldSortRule = $this->sortRule;
        $this->clearSortRule();
        if ($sortRule) {
            $this->setSortRule($sortRule);
        } else {
            $this->setSortRule($this->sortRule);
        }

        $limit = ($count == -1) ? null : array('count' => $count, 'offset' => $offset);

        $dataSet = new DataSet($this);
        $resultSet = $this->_run_search($limit);
        if ($resultSet !== null) {
            $i = 0;
            while ($recArray = $this->_fetch_record($resultSet)) {
                $dataSet[$i++] = $recArray;
            }
        }

        $this->sortRule = $oldSortRule;
        $this->searchRule = $oldSearchRule;
        $this->currentRecord = $curRecord;
        $this->recordId = $recId;

        if (count($dataSet) == 0) {
            return new DataSet(null);
        }
        return $dataSet;
    }
public function directFetch ( $ searchRule = "" , $ count = - 1 , $ offset = 0 , $ sortRule = "" ) { //Openbizx::$app->getClientProxy()->showClientAlert(__METHOD__ .'-'. __LINE__ . ' msg: $searchRule : '.$searchRule); $ curRecord = $ this -> currentRecord ; $ recId = $ this -> recordId ; $ this -> currentRecord = null ; $ oldSearchRule = $ this -> searchRule ; $ this -> clearSearchRule ( ) ; $ this -> setSearchRule ( $ searchRule ) ; $ oldSortRule = $ this -> sortRule ; $ this -> clearSortRule ( ) ; if ( $ sortRule ) { $ this -> setSortRule ( $ sortRule ) ; } else { $ this -> setSortRule ( $ this -> sortRule ) ; } $ limit = ( $ count == - 1 ) ? null : array ( 'count' => $ count , 'offset' => $ offset ) ; $ dataSet = new DataSet ( $ this ) ; $ resultSet = $ this -> _run_search ( $ limit ) ; if ( $ resultSet !== null ) { $ i = 0 ; while ( $ recArray = $ this -> _fetch_record ( $ resultSet ) ) { $ dataSet [ $ i ++ ] = $ recArray ; } } $ this -> sortRule = $ oldSortRule ; $ this -> searchRule = $ oldSearchRule ; $ this -> currentRecord = $ curRecord ; $ this -> recordId = $ recId ; if ( count ( $ dataSet ) == 0 ) { return new DataSet ( null ) ; } return $ dataSet ; }
Fetches SQL result rows as a sequential array without using query rules set before.

@param string $searchRule the search rule string
@param int $count number of records to return
@param int $offset the starting point of the return records
@return DataSet set of records
Fetches SQL result rows as a sequential array without using query rules set before .