debugging

This commit is contained in:
2017-06-29 14:46:44 +10:00
parent 4cf96a2a68
commit d75b946bdb

View File

@@ -148,12 +148,14 @@ function booking_earlyaccess_csv_report() {
->orderBy('cid'); ->orderBy('cid');
$result = $codelist_query->execute(); $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 //calculate the header row for CSV
$header = implode( $delimiter, array_keys($result)); $header = implode($delimiter, array_keys($result));
$csv .= $header . "\n"; $csv .= $header . "\n";
//add the records //add the records
foreach ($result as $record) { foreach (reset($result) as $record) {
$output = array(); $output = array();
//each keypair in the record //each keypair in the record
foreach ($record as $key => $value) { foreach ($record as $key => $value) {