You are here

function _views_query::_views_query in Views (for Drupal 7) 5

File

./views_query.inc, line 287

Class

_views_query

Code

function _views_query($primary_table = 'node', $primary_field = 'nid', $alias_prefix = '') {
  $this->primary_table = $primary_table;
  $this->primary_field = $primary_field;
  $this->joins = array();
  $this->where = array();
  $this->orderby = array();
  $this->groupby = array();
  $this->tables = array();
  $this->where_args = array();
  $this->use_alias_prefix = $alias_prefix;

  // Joins care about order, so we put our tables in a queue to make sure
  // the order is correct.
  $this->tablequeue = array();
  if ($primary_field) {
    $this->fields = array(
      $alias_prefix . "{$primary_table}.{$primary_field}",
    );
  }
  $this->count_field = $alias_prefix . "{$primary_table}.{$primary_field}";
  $this->header = array();
}