community_tags_views_handler_field_tag_count.inc in Community Tags 6.2
File
community_tags_views/views/handlers/community_tags_views_handler_field_tag_count.inc
View source
<?php
class community_tags_views_handler_field_tag_count extends views_handler_field_numeric {
function query() {
$this
->ensure_my_table();
$aggregate_field = 'COUNT(' . $this->table_alias . '.tid)';
$this->field_alias = $this->query
->add_field(NULL, $aggregate_field, $this->field, array(
'aggregate' => TRUE,
));
$this->query->distinct = TRUE;
}
}