Skip to content
Snippets Groups Projects
Commit f9d21864 authored by Finlay White's avatar Finlay White :speech_balloon:
Browse files

test

parent f7488e4f
No related branches found
No related tags found
No related merge requests found
......@@ -353,7 +353,7 @@ BEGIN
END$$
DELIMITER ;
drop procedure if exists addToGroup;
drop procedure if exists `addToGroup`;
delimiter $$
CREATE PROCEDURE addToGroup(
IN grapeID varchar(40))
......@@ -374,7 +374,7 @@ select count(distinct volunteerID) *(SELECT ageGroup from Sessions where groupID
set toad = @maxstu - @currentStu;
-- toad reprisents how many students the program should add off the WaitList
-- the next loop adds a student to the group from the waitlist equal
-- to the amount of
-- to the amount of spaces available
if toad is not null and toad >0 then
adding_loop : LOOP
SET x=x+1;
......@@ -391,6 +391,10 @@ select count(distinct volunteerID) *(SELECT ageGroup from Sessions where groupID
END IF;
END LOOP adding_loop;
end if;
select * from WaitList
-- you should see that a number of students application should be successful
-- (if theres space) by dateremoved being null is they still are waiting or
-- todays date if they got added
END$$
DELIMITER ;
......@@ -424,7 +428,25 @@ BEGIN
END$$
DELIMITER ;
-- under article 17 of the UK gdpr individuals
-- have the right to have personal data erased
-- next 3 functions handle deleting said data
drop procedure if exists EraseParent;
delimiter $$
CREATE PROCEDURE EraseParent(
IN email varchar(320),
IN passw varchar(70))
-- removes children as well
-- we need emergency contact details in case of emergency
-- we are not a financial institution so we don't have a legal requirement
BEGIN
Delete from parents where ParentsID=md5(concat(email,passw));
Delete from badgeawarded where awardedto in()
Delete from Students where parentsID=md5(concat(email,passw));
END$$
DELIMITER ;
drop procedure if exists updateSG;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment