try resetting

This commit is contained in:
2017-06-29 15:03:32 +10:00
parent ff036eab50
commit 2b01006b0a

View File

@@ -148,7 +148,7 @@ function booking_earlyaccess_csv_report() {
->orderBy('cid'); ->orderBy('cid');
$result = $codelist_query->execute(); $result = $codelist_query->execute();
$firstresult = reset($result); $firstresult = $result;
watchdog('booking', "CSV firstresult: @info", array('@info' => var_export($firstresult, TRUE))); watchdog('booking', "CSV firstresult: @info", array('@info' => var_export($firstresult, TRUE)));
foreach ($firstresult as $record) { foreach ($firstresult as $record) {
watchdog('booking', "CSV first record for header: @info", array('@info' => var_export($record, TRUE))); watchdog('booking', "CSV first record for header: @info", array('@info' => var_export($record, TRUE)));
@@ -165,6 +165,7 @@ function booking_earlyaccess_csv_report() {
watchdog('booking', "CSV before: @info", array('@info' => var_export($csv, TRUE))); watchdog('booking', "CSV before: @info", array('@info' => var_export($csv, TRUE)));
//add the records //add the records
reset($result);
foreach ($result as $record) { foreach ($result as $record) {
$output = array(); $output = array();
//each keypair in the record //each keypair in the record