mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Make sure data comes out in the right order
This commit is contained in:
@@ -464,11 +464,12 @@ function limesurvey_export_fixed_width($questionnaire_id,$sample_import_id = fal
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
//foreach question
|
//foreach question
|
||||||
$sql = "SELECT *
|
$sql = "SELECT q.*
|
||||||
FROM ".LIME_PREFIX."questions
|
FROM ".LIME_PREFIX."questions as q, ".LIME_PREFIX."groups as g
|
||||||
WHERE sid=$surveyid
|
WHERE q.sid=$surveyid
|
||||||
AND type NOT LIKE 'X'
|
AND q.type NOT LIKE 'X'
|
||||||
ORDER BY gid,question_order ASC";
|
AND g.gid = q.gid
|
||||||
|
ORDER BY g.group_order ASC,q.question_order ASC";
|
||||||
|
|
||||||
$r = $db->GetAll($sql);
|
$r = $db->GetAll($sql);
|
||||||
foreach ($r as $RowQ)
|
foreach ($r as $RowQ)
|
||||||
|
|||||||
Reference in New Issue
Block a user