From 244f809c27df2a951b80bba3b0544206a9a2eefc Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Sun, 2 Aug 2009 20:35:38 +0000 Subject: [PATCH] Fixed issue #3468: Error while exporting survey structure on MSSQL server git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@7390 b72ed6b6-b9f8-46b5-92b4-906544132732 --- admin/export_structure_csv.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/admin/export_structure_csv.php b/admin/export_structure_csv.php index 3f69aaa839d..662be6e6018 100644 --- a/admin/export_structure_csv.php +++ b/admin/export_structure_csv.php @@ -115,14 +115,13 @@ WHERE ({$dbprefix}labels.lid={$dbprefix}questions.lid or {$dbprefix}labels.lid={$dbprefix}questions.lid1) AND type in ('F', 'W', 'H', 'Z', '1', ':', ';') AND sid=$surveyid - GROUP BY {$dbprefix}labels.lid, {$dbprefix}labels.code, {$dbprefix}labels.title, {$dbprefix}labels.sortorder,{$dbprefix}labels.language"; + GROUP BY {$dbprefix}labels.lid, {$dbprefix}labels.code, {$dbprefix}labels.title, {$dbprefix}labels.sortorder,{$dbprefix}labels.language,{$dbprefix}labels.assessment_value"; $ldump = BuildCSVFromQuery($lquery); //9: Question Attributes -$query = "SELECT DISTINCT {$dbprefix}question_attributes.* - FROM {$dbprefix}question_attributes, {$dbprefix}questions - WHERE {$dbprefix}question_attributes.qid={$dbprefix}questions.qid - AND {$dbprefix}questions.sid=$surveyid"; +$query = "SELECT {$dbprefix}question_attributes.qaid, {$dbprefix}question_attributes.qid, {$dbprefix}question_attributes.attribute, {$dbprefix}question_attributes.value + FROM {$dbprefix}question_attributes + WHERE {$dbprefix}question_attributes.qid in (select qid from {$dbprefix}questions where sid=$surveyid group by qid)"; $qadump = BuildCSVFromQuery($query); //10: Assessments;