Skip to content
Snippets Groups Projects
Commit f54d4230 authored by Andrew Rudenets's avatar Andrew Rudenets
Browse files

Stored function for removing from group

parent fb018b13
Branches
Tags
No related merge requests found
......@@ -767,6 +767,26 @@ BEGIN
RETURN ROW_COUNT()-1;
END //
DROP FUNCTION IF EXISTS RemoveFromGroupInSemester//
CREATE FUNCTION `RemoveFromGroupInSemester` (
`pStudentID` INT,
`pGroupID` INT,
`pSemesterID` INT
) RETURNS int(11)
NO SQL
BEGIN
DECLARE vChecker INT DEFAULT 0;
DECLARE EXIT HANDLER FOR SQLEXCEPTION RETURN -1;
DELETE FROM `students_groups`
WHERE students_groups.GroupID = pGroupID
and students_groups.StudentID = pStudentID
and students_groups.SemesterID = pSemesterID
and students_groups.State = 'common'
LIMIT 1;
RETURN ROW_COUNT()-1;
END //
# -------------------------------------------------------------------------------------------
# Label: disciplines
......
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