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: Should the view by distincted.

bool $pure_distinct: Should only the sql keyword be added.

File

core/modules/views/plugins/views_plugin_query_default.inc, line 178
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;
  }
}