-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocedureStocker
47 lines (26 loc) · 1.86 KB
/
procedureStocker
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
delimiter |
create procedure formInsertCode(libelleCours varchar(256), libCodeBaps varchar(256), libCodeRayhane varchar(256))
BEGIN
insert ignore into codeBaps(libelleCodeBaps) values(libCodeBaps);
insert ignore into cours(libelle, codeBaps) values(libelleCours, libCodeBaps);
insert ignore into codeRayhane(codeRayhane, codebaps) values(libCodeRayhane, libCodeBaps);
update ignore codeBaps set libelleCours = libelleCours, codeRayhane = libCodeRayhane where id = (select max(id));
end |
delimiter ;
delimiter |
create procedure formInsertFiles(libelleCoursSource varchar(256), emplacementCoursSource varchar(256), emplacementSlide varchar(256), libelleSupportCoursGen varchar(256), emplacementSupportCoursGen varchar(256), libCodeBaps varchar(256), libCodeRayhane varchar(256), csv varchar(256))
BEGIN
insert ignore into supportCoursSource(emplacement, libelle, codeBaps, codeRayhane) values (emplacementCoursSource, libelleCoursSource, libCodeBaps, libCodeRayhane);
insert ignore into supportCoursGen(emplacement, libelle, supportCoursSource, codeBaps, codeRayhane) values(emplacementSupportCoursGen, libelleSupportCoursGen, libelleCoursSource, libCodeBaps, libCodeRayhane);
insert into csv(emplacement) values(csv);
insert into slide(emplacementFichier, supportCoursSource, supportCoursGen, codeBaps, codeRayhane, emplacementCsv) values (emplacementSlide, libelleCoursSource, libelleSupportCoursGen, libCodeBaps, libCodeRayhane, csv);
update supportCoursSource set slide = emplacementSlide, supportCoursGen = libelleSupportCoursGen where id = (select max(id));
update supportCoursGen set slide = emplacementSlide where id = (select max(id));
end |
delimiter ;
delimiter |
create procedure insertPdg(libelle varchar(256), emplacement varchar(256))
Begin
insert ignore into stockerPageDeGarde(emplacement, libelle) values(emplacement , libelle);
end |
delimiter ;