update mysql view for variety session registration ids
This commit is contained in:
@@ -72,6 +72,11 @@ function _booking_node_create_mysqlview()
|
||||
}
|
||||
}
|
||||
|
||||
//add the joins for variety session info if enabled
|
||||
if (variable_get('booking_enable_variety_sessions', 0) == 1) {
|
||||
$query->leftJoin('booking_variety_regn', 'v', 'p.nid = v.booking_person_nid');
|
||||
}
|
||||
|
||||
//filter the results either by current active event
|
||||
// @todo is this filter really necessary?
|
||||
$query->condition('p.booking_eventid', $event->eid, '=');
|
||||
@@ -102,6 +107,11 @@ function _booking_node_create_mysqlview()
|
||||
}
|
||||
}
|
||||
|
||||
//add field for variety session registrations if enabled
|
||||
if (variable_get('booking_enable_variety_sessions', 0) == 1) {
|
||||
$query->fields('v', array('booking_variety_ids'));
|
||||
}
|
||||
|
||||
//now that we have built the query as a SelectObject, turn it into a string we can use to create a view
|
||||
$querystring=$query->__toString();
|
||||
$querystring=str_replace("{",'',$querystring);
|
||||
|
Reference in New Issue
Block a user