1 views_plugin_query_default.inc views_plugin_query_default::set_distinct($value = TRUE, $pure_distinct = FALSE)

Set the view to be distinct.

There are either distinct per base field or distinct in the pure SQL way, based on $pure_distinct.

Parameters

bool $value: Whether or not the view is distinct.

bool $pure_distinct: Whether just the SQL keyword should be added.

File

core/modules/views/plugins/views_plugin_query_default.inc, line 166
Defines the default query object.

Class

views_plugin_query_default
Object used to create a SELECT query.

Code

function set_distinct($value = TRUE, $pure_distinct = FALSE) {
  if (!(isset($this->no_distinct) && $value)) {
    $this->distinct = $value;
    $this->pure_distinct = $pure_distinct;
  }
}