update _booking_node_create_mysqlview()

This commit is contained in:
2016-06-01 22:29:00 +10:00
parent b9c032558e
commit deed7bfb5f

View File

@@ -23,6 +23,14 @@ function _booking_node_create_mysqlview()
global $event;
$studygroups = array();
//sometimes we will execute when hook_init hasn't been called
//for example at install or upgrade time
//so query the database directly for the event currently active
if ($event == NULL) {
watchdog('booking_debug', "Calling _booking_node_create_mysqlview() when hook_init not yet run.");
$event = db_query("SELECT * from {booking_event} where booking_event_active=1")->fetchObject();
}
$query = db_select('booking_person', 'p');
//add price info
$query->join('booking_price', 'pr', 'p.booking_payment_id = pr.pid');