update _booking_node_create_mysqlview()
This commit is contained in:
@@ -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');
|
||||
|
Reference in New Issue
Block a user