Skip to content

Commit

Permalink
Fixed issue #3584: MS SQL Error when trying to export results to appl…
Browse files Browse the repository at this point in the history
…ication

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@7487 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Aug 18, 2009
1 parent 24e0df0 commit 37d5d36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admin/exportresults.php
Expand Up @@ -109,7 +109,7 @@
elseif ($rows['type']=='1')
{
// $detailquery="select code from {$dbprefix}answers where qid=".$rows['qid']." and language='$surveybaselang' order by sortorder,code";
$detailquery="select a.code, l.lid from {$dbprefix}answers as a, {$dbprefix}labels as l where qid=".$rows['qid']." AND (l.lid =".$rows['lid'].") and a.language='$surveybaselang' group by a.code order by a.code ";
$detailquery="select a.code, l.lid from {$dbprefix}answers as a, {$dbprefix}labels as l where qid=".$rows['qid']." AND (l.lid =".$rows['lid'].") and a.language='$surveybaselang' group by a.code, l.lid order by a.code ";
$detailresult=db_execute_assoc($detailquery) or safe_die("Couldn't find detailfields<br />$detailquery<br />".$connect->ErrorMsg());
$i=0;
while ($detailrows = $detailresult->FetchRow())
Expand All @@ -119,7 +119,7 @@
$i++;
}
// second scale
$detailquery="select a.code, l.lid from {$dbprefix}answers as a, {$dbprefix}labels as l where qid=".$rows['qid']." AND (l.lid =".$rows['lid1'].") and a.language='$surveybaselang' group by a.code order by a.code ";
$detailquery="select a.code, l.lid from {$dbprefix}answers as a, {$dbprefix}labels as l where qid=".$rows['qid']." AND (l.lid =".$rows['lid1'].") and a.language='$surveybaselang' group by a.code, l.lid order by a.code ";
$detailresult=db_execute_assoc($detailquery) or safe_die("Couldn't find detailfields<br />$detailquery<br />".$connect->ErrorMsg());
$i=0;
while ($detailrows = $detailresult->FetchRow())
Expand Down

0 comments on commit 37d5d36

Please sign in to comment.