library/database/class.sqldriver.php
public function Get($Table = '', $OrderFields = '', $OrderDirection = 'asc', $Limit = FALSE, $PageNumber = FALSE) {
      if ($Table != '') {
         //$this->MapAliases($Table);
         $this->From($Table);
      }

      if ($OrderFields != '')
         $this->OrderBy($OrderFields, $OrderDirection);

      if ($Limit !== FALSE) {
         if ($PageNumber == FALSE || $PageNumber < 1)
            $PageNumber = 1;

         $Offset = ($PageNumber - 1) * $Limit;
         $this->Limit($Limit, $Offset);
      }

      $Result = $this->Query($this->GetSelect());
      return $Result;
   }
public function Get($Table = '', $OrderFields = '', $OrderDirection = 'asc', $Limit = FALSE, $PageNumber = FALSE) {
      if ($Table != '') {
         //$this->MapAliases($Table);
         $this->From($Table);
      }

      if ($OrderFields != '')
         $this->OrderBy($OrderFields, $OrderDirection);

      if ($Limit !== FALSE) {
         if ($PageNumber == FALSE || $PageNumber < 1)
            $PageNumber = 1;

         $Offset = ($PageNumber - 1) * $Limit;
         $this->Limit($Limit, $Offset);
      }

      $Result = $this->Query($this->GetSelect());
      return $Result;
   }
public function Get ( $ Table = '' , $ OrderFields = '' , $ OrderDirection = 'asc' , $ Limit = FALSE , $ PageNumber = FALSE ) { if ( $ Table != '' ) { //$this->MapAliases($Table); $ this -> From ( $ Table ) ; } if ( $ OrderFields != '' ) $ this -> OrderBy ( $ OrderFields , $ OrderDirection ) ; if ( $ Limit !== FALSE ) { if ( $ PageNumber == FALSE || $ PageNumber < 1 ) $ PageNumber = 1 ; $ Offset = ( $ PageNumber - 1 ) * $ Limit ; $ this -> Limit ( $ Limit , $ Offset ) ; } $ Result = $ this -> Query ( $ this -> GetSelect ( ) ) ; return $ Result ; }
Builds the select statement and runs the query, returning a result object.

@param string $Table          The table from which to select data. Adds to the $this->_Froms collection.
@param string $OrderFields    A string of fields to be ordered.
@param string $OrderDirection The direction of the sort.
@param int    $Limit          Adds a limit to the query.
@param int    $PageNumber     The page of data to retrieve.
@return Gdn_DataSet
Builds the select statement and runs the query returning a result object .