original_string: public function select(
          $table,
          $conditions = null,
          $fields = null,
          $order = null,
          $limit = null,
          $offset = null
      )
      {
          if (is_null($fields)) {
              $fields = "*";
          }
  
          $queryString = "SELECT {$fields} FROM {$table} ";
  
          if (!is_null($conditions)) {
              $queryString .= "WHERE {$conditions} ";
          }
  
          if (!is_null($order)) {
              $queryString .= "ORDER BY {$order} ";
          }
  
          if (!is_null($limit)) {
              $queryString .= "LIMIT {$limit} ";
          }
  
          if (!is_null($offset) && !is_null($limit)) {
              $queryString .= "OFFSET {$offset} ";
          }
  
  
          $queryString .= ";";
  
          $this->query($queryString);
  
          return $this->countRows();
      }
code: public function select(
          $table,
          $conditions = null,
          $fields = null,
          $order = null,
          $limit = null,
          $offset = null
      )
      {
          if (is_null($fields)) {
              $fields = "*";
          }
  
          $queryString = "SELECT {$fields} FROM {$table} ";
  
          if (!is_null($conditions)) {
              $queryString .= "WHERE {$conditions} ";
          }
  
          if (!is_null($order)) {
              $queryString .= "ORDER BY {$order} ";
          }
  
          if (!is_null($limit)) {
              $queryString .= "LIMIT {$limit} ";
          }
  
          if (!is_null($offset) && !is_null($limit)) {
              $queryString .= "OFFSET {$offset} ";
          }
  
  
          $queryString .= ";";
  
          $this->query($queryString);
  
          return $this->countRows();
      }
code_tokens: public function select ( $ table , $ conditions = null , $ fields = null , $ order = null , $ limit = null , $ offset = null ) { if ( is_null ( $ fields ) ) { $ fields = "*" ; } $ queryString = "SELECT {$fields} FROM {$table} " ; if ( ! is_null ( $ conditions ) ) { $ queryString .= "WHERE {$conditions} " ; } if ( ! is_null ( $ order ) ) { $ queryString .= "ORDER BY {$order} " ; } if ( ! is_null ( $ limit ) ) { $ queryString .= "LIMIT {$limit} " ; } if ( ! is_null ( $ offset ) && ! is_null ( $ limit ) ) { $ queryString .= "OFFSET {$offset} " ; } $ queryString .= ";" ; $ this -> query ( $ queryString ) ; return $ this -> countRows ( ) ; }
docstring: Perform a SELECT statement
  
  @param string $table
  @param string $conditions
  @param string $fields
  @param string $order
  @param string $limit
  @param string $offset
  
  @return int number of affected rows
docstring_tokens: Perform a SELECT statement