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

      if ($Where !== FALSE)
         $this->Where($Where);

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

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

      if ($Where !== FALSE)
         $this->Where($Where);

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

      $Result = $this->Query($this->GetSelect());
      
      return $Result;
   }
public function GetWhere ( $ Table = '' , $ Where = FALSE , $ OrderFields = '' , $ OrderDirection = 'asc' , $ Limit = FALSE , $ Offset = 0 ) { if ( $ Table != '' ) { //$this->MapAliases($Table); $ this -> From ( $ Table ) ; } if ( $ Where !== FALSE ) $ this -> Where ( $ Where ) ; if ( $ OrderFields != '' ) $ this -> OrderBy ( $ OrderFields , $ OrderDirection ) ; if ( $ Limit !== FALSE ) $ this -> Limit ( $ Limit , $ Offset ) ; $ Result = $ this -> Query ( $ this -> GetSelect ( ) ) ; return $ Result ; }
Builds the select statement and runs the query, returning a result
object. Allows a where clause, limit, and offset to be added directly.

@param string $Table The table from which to select data. Adds to the $this->_Froms collection.
@param mixed  $Where Adds to the $this->_Wheres collection using $this->Where();
@param string $OrderFields A string of fields to be ordered.
@param string $OrderDirection The direction of the sort.
@param int    $Limit The number of records to limit the query to.
@param int    $Offset The offset where the query results should begin.
@return Gdn_DataSet The data returned by the query.
Builds the select statement and runs the query returning a result object . Allows a where clause limit and offset to be added directly .