change query again

This commit is contained in:
Nathan Coad
2018-05-04 22:58:44 +10:00
parent 9ac93d701c
commit 63a17dcefc

View File

@@ -393,17 +393,18 @@ function booking_varietysessions_csv_report($timeslot_id) {
$variety_sessions = db_select('booking_variety_sessions', 'v') $variety_sessions = db_select('booking_variety_sessions', 'v')
->condition($db_and) ->condition($db_and)
->fields('v'); ->fields('v')
$variety_sessions_result = $variety_sessions->execute(); ->execute()
->fetchAssoc();
watchdog('booking_debug', 'booking_varietysessions_csv_report variety sessions: <pre>@info</pre>', array('@info' => print_r( $variety_sessions_result, true))); watchdog('booking_debug', 'booking_varietysessions_csv_report variety sessions: <pre>@info</pre>', array('@info' => print_r( $variety_sessions_result, true)));
/*
if ($variety_sessions_result->rowCount() == 0) { if ($variety_sessions_result->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 "";
} }
*/
//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');