use different query
This commit is contained in:
@@ -387,10 +387,14 @@ function booking_varietysessions_csv_report($timeslot_id) {
|
||||
}
|
||||
|
||||
//retrieve the sessions for the specified timeslot
|
||||
$variety_sessions = db_query("SELECT * FROM {booking_variety_sessions} WHERE booking_eventid = :eid and booking_variety_timeslot_id = :tid",
|
||||
array(':eid' => $event->eid, ':tid' => $timeslot_id));
|
||||
|
||||
if (! $variety_sessions) {
|
||||
$variety_sessions = db_select('booking_variety_sessions', 'v');
|
||||
$db_and = db_and();
|
||||
$db_and->condition('v.booking_eventid', $event->eid, '=');
|
||||
$db_and->condition('v.booking_variety_timeslot_id', $timeslot_id, '=');
|
||||
$variety_sessions->fields('v')
|
||||
->execute();
|
||||
|
||||
if ($variety_sessions->rowCount() == 0) {
|
||||
drupal_set_message("Error: Could not find matching variety session timeslot. Unable to view session membership.", 'error', FALSE);
|
||||
drupal_goto('admin/config/booking/variety');
|
||||
return "";
|
||||
|
Reference in New Issue
Block a user