You are here

function views_handler_field_node_registration_used_slots::query in Node registration 7

Called to add the field to a query.

Overrides views_handler_field::query

File

includes/views/views_handler_field_node_registration_used_slots.inc, line 10

Class

views_handler_field_node_registration_used_slots
@file

Code

function query() {
  $this->query
    ->add_field(NULL, '(SELECT SUM(slots) FROM {node_registration} WHERE nid = node.nid AND cancelled = 0)', 'registration_used_slots');
}