From d75b946bdb4ee47161a17e22090d955edbf6940f Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Thu, 29 Jun 2017 14:46:44 +1000 Subject: [PATCH] debugging --- booking.earlyaccess_admin.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/booking.earlyaccess_admin.inc b/booking.earlyaccess_admin.inc index 3328f21..334fd72 100644 --- a/booking.earlyaccess_admin.inc +++ b/booking.earlyaccess_admin.inc @@ -148,12 +148,14 @@ function booking_earlyaccess_csv_report() { ->orderBy('cid'); $result = $codelist_query->execute(); + watchdog('booking_debug', "EarlyAccess CSV query result: @info", array('@info' => var_export( $result, TRUE))); + watchdog('booking_debug', "EarlyAccess CSV array keys: @info", array('@info' => var_export( array_keys($result), TRUE))); //calculate the header row for CSV - $header = implode( $delimiter, array_keys($result)); + $header = implode($delimiter, array_keys($result)); $csv .= $header . "\n"; //add the records - foreach ($result as $record) { + foreach (reset($result) as $record) { $output = array(); //each keypair in the record foreach ($record as $key => $value) {