Skip to content
Snippets Groups Projects
Commit 233897cc authored by PavelBegunkov's avatar PavelBegunkov
Browse files

sort

parent 02409701
Branches
Tags
No related merge requests found
......@@ -1064,8 +1064,10 @@ BEGIN
study_groups.ID = disciplines_groups.StudyGroupID
LEFT JOIN `disciplines_students` ON DisciplineID = disciplines_students.DisciplineID AND
students.ID = disciplines_students.StudentID
WHERE disciplines_students.Type = 'attach' OR
disciplines_groups.StudyGroupID IS NOT NULL;
WHERE disciplines_groups.StudyGroupID IS NOT NULL OR
disciplines_students.StudentID IS NOT NULL
ORDER BY study_groups.Grade ASC, study_groups.GroupNum;
ELSE
SELECT NULL AS 'StudentID',
NULL AS 'LastName',
......@@ -1336,7 +1338,8 @@ BEGIN
WHERE disciplines_students.Type = 'attach' OR
( ( disciplines_students.Type IS NULL OR disciplines_students.Type != 'detach' ) AND
disciplines_groups.StudyGroupID IS NOT NULL
);
)
ORDER BY study_groups.Grade ASC, study_groups.GroupNum ASC;
ELSE
SELECT NULL AS 'StudentID',
NULL AS 'LastName',
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment