Fix progessor SQL (when UE disabled)
This commit is contained in:
parent
f0a2e57394
commit
faa0ce19ce
|
@ -260,25 +260,25 @@ class professor extends Repo_i {
|
|||
Professeur Prof,
|
||||
Categorie Cat,
|
||||
(SELECT IFNULL(SUM(Cours.volume),0) VHCours, Prof.idProfesseur idProf
|
||||
FROM Professeur Prof
|
||||
LEFT JOIN Cours ON Prof.idProfesseur = Cours.Professeur_idProfesseur
|
||||
JOIN UE U ON Cours.UE_code = U.code
|
||||
WHERE U.disabled = 0
|
||||
GROUP BY Prof.idProfesseur) VHCours,
|
||||
|
||||
(SELECT IFNULL(SUM(TD.volume),0) VHTd , Prof.idProfesseur idProf
|
||||
FROM Professeur Prof
|
||||
LEFT JOIN TD ON TD.Professeur_idProfesseur = Prof.idProfesseur
|
||||
JOIN UE U2 ON TD.UE_code = U2.code
|
||||
WHERE U2.disabled = 0
|
||||
GROUP BY Prof.idProfesseur) VHTd,
|
||||
|
||||
(SELECT IFNULL(SUM(TP.volume),0) VHTp, Prof.idProfesseur idProf
|
||||
FROM Professeur Prof
|
||||
LEFT JOIN TP ON TP.Professeur_idProfesseur = Prof.idProfesseur
|
||||
JOIN UE U3 ON TP.UE_code = U3.code
|
||||
WHERE U3.disabled = 0
|
||||
GROUP BY Prof.idProfesseur) VHTp
|
||||
FROM Professeur Prof
|
||||
LEFT JOIN Cours ON Prof.idProfesseur = Cours.Professeur_idProfesseur
|
||||
LEFT JOIN UE U ON Cours.UE_code = U.code
|
||||
GROUP BY Prof.idProfesseur, U.disabled
|
||||
HAVING (U.disabled = 0 OR U.disabled IS NULL)) VHCours,
|
||||
|
||||
(SELECT IFNULL(SUM(TD.volume),0) VHTd , Prof.idProfesseur idProf
|
||||
FROM Professeur Prof
|
||||
LEFT JOIN TD ON TD.Professeur_idProfesseur = Prof.idProfesseur
|
||||
LEFT JOIN UE U2 ON TD.UE_code = U2.code
|
||||
GROUP BY Prof.idProfesseur, U2.disabled
|
||||
HAVING (U2.disabled = 0 OR U2.disabled IS NULL)) VHTd,
|
||||
|
||||
(SELECT IFNULL(SUM(TP.volume),0) VHTp, Prof.idProfesseur idProf
|
||||
FROM Professeur Prof
|
||||
LEFT JOIN TP ON TP.Professeur_idProfesseur = Prof.idProfesseur
|
||||
LEFT JOIN UE U3 ON TP.UE_code = U3.code
|
||||
GROUP BY Prof.idProfesseur, U3.disabled
|
||||
HAVING (U3.disabled = 0 OR U3.disabled IS NULL)) VHTp
|
||||
|
||||
WHERE $cond Prof.Categorie_idCategorie = Cat.idCategorie
|
||||
AND VHCours.idProf = Prof.idProfesseur
|
||||
|
|
Loading…
Reference in New Issue