Skip to content

Commit

Permalink
Minor fix for export: now makes proper use of responseID instead of l…
Browse files Browse the repository at this point in the history
…imit / offset
  • Loading branch information
mennodekker committed Jul 10, 2013
1 parent c274c0c commit d07c925
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions application/helpers/admin/export/SurveyDao.php
Expand Up @@ -113,7 +113,10 @@ public function loadSurveyResults(SurveyObj $survey, $iMinimum, $iMaximum, $sFil
if ($sFilter!='')
$oRecordSet->where($sFilter);

$iOffset = $iMinimum - 1;
$survey->responses=$oRecordSet->select($aSelectFields)->order('{{survey_' . $survey->id . '}}.id')->limit($iMaximum - $iOffset, $iOffset)->query();
$aParams = array(
'min'=>$iMinimum,
'max'=>$iMaximum
);
$survey->responses=$oRecordSet->select($aSelectFields)->where('id >= :min AND id <= :max', $aParams)->query();
}
}

0 comments on commit d07c925

Please sign in to comment.