fix query
This commit is contained in:
@@ -387,20 +387,23 @@ function booking_varietysessions_csv_report($timeslot_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//retrieve the sessions for the specified timeslot
|
//retrieve the sessions for the specified timeslot
|
||||||
$variety_sessions = db_select('booking_variety_sessions', 'v');
|
|
||||||
$db_and = db_and();
|
$db_and = db_and();
|
||||||
$db_and->condition('v.booking_eventid', $event->eid, '=');
|
$db_and->condition('v.booking_eventid', $event->eid, '=');
|
||||||
$db_and->condition('v.booking_variety_timeslot_id', $timeslot_id, '=');
|
$db_and->condition('v.booking_variety_timeslot_id', $timeslot_id, '=');
|
||||||
$variety_sessions->fields('v')
|
|
||||||
|
$variety_sessions = db_select('booking_variety_sessions', 'v')
|
||||||
|
->condition($db_and)
|
||||||
|
->fields('v')
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
|
watchdog('booking_debug', 'booking_varietysessions_csv_report variety sessions: <pre>@info</pre>', array('@info' => print_r( $variety_sessions, true)));
|
||||||
|
|
||||||
if ($variety_sessions->rowCount() == 0) {
|
if ($variety_sessions->rowCount() == 0) {
|
||||||
drupal_set_message("Error: Could not find matching variety session timeslot. Unable to view session membership.", 'error', FALSE);
|
drupal_set_message("Error: Could not find matching variety session timeslot. Unable to view session membership.", 'error', FALSE);
|
||||||
drupal_goto('admin/config/booking/variety');
|
drupal_goto('admin/config/booking/variety');
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
watchdog('booking_debug', 'booking_varietysessions_csv_report variety sessions: <pre>@info</pre>', array('@info' => print_r( $variety_sessions, true)));
|
|
||||||
|
|
||||||
//set options for the CSV file
|
//set options for the CSV file
|
||||||
$name = 'bookings-variety-sessions-' . format_date(time(), 'custom', 'Y-m-d-His');
|
$name = 'bookings-variety-sessions-' . format_date(time(), 'custom', 'Y-m-d-His');
|
||||||
|
Reference in New Issue
Block a user