1 views_plugin_query_default.inc views_plugin_query_default::set_count_field($table, $field, $alias = NULL)

Set what field the query will count() on for paging.

File

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

Class

views_plugin_query_default
Object used to create a SELECT query.

Code

function set_count_field($table, $field, $alias = NULL) {
  if (empty($alias)) {
    $alias = $table . '_' . $field;
  }
  $this->count_field = array(
    'table' => $table,
    'field' => $field,
    'alias' => $alias,
    'count' => TRUE,
  );
}