because your request is shit
This commit is contained in:
parent
4999dcee05
commit
127132f9b2
|
@ -193,27 +193,20 @@ class ue extends Repo_i {
|
||||||
FROM UE ue
|
FROM UE ue
|
||||||
LEFT JOIN Formation fdef ON ue.Formation_idFormation = fdef.idFormation
|
LEFT JOIN Formation fdef ON ue.Formation_idFormation = fdef.idFormation
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT ue2.code code, CONCAT('[',GROUP_CONCAT(fform.idFormation), ']') formations
|
SELECT ue2.code code, CONCAT('[',GROUP_CONCAT(DISTINCT Formation.idFormation), ']') formations
|
||||||
FROM UE ue2, Formation fform
|
FROM UE ue2
|
||||||
WHERE ( fform.idFormation IN (
|
LEFT JOIN Cours C ON ue2.code = C.UE_code
|
||||||
SELECT DISTINCT Formation_idFormation as idForm
|
LEFT JOIN TD T ON ue2.code = T.UE_code
|
||||||
FROM GroupeCours
|
LEFT JOIN TP T2 ON ue2.code = T2.UE_code
|
||||||
WHERE Cours_idCours IN ( SELECT idCours FROM Cours WHERE UE_code = ue2.code GROUP BY idForm )
|
LEFT JOIN GroupeCours C2 ON C.idCours = C2.Cours_idCours
|
||||||
)
|
LEFT JOIN GroupeTD TD2 ON T.idTD = TD2.TD_idTD
|
||||||
OR fform.idFormation IN (
|
LEFT JOIN GroupeTP TP2 ON T2.idTP = TP2.TP_idTP
|
||||||
SELECT DISTINCT Formation_idFormation as idForm
|
JOIN Formation ON C2.Formation_idFormation = Formation.idFormation
|
||||||
FROM GroupeTD
|
OR TD2.Formation_idFormation = Formation.idFormation
|
||||||
WHERE TD_idTD IN ( SELECT idTD FROM TD WHERE UE_code = ue2.code GROUP BY idForm )
|
OR TP2.Formation_idFormation = Formation.idFormation
|
||||||
)
|
|
||||||
OR fform.idFormation IN (
|
|
||||||
SELECT DISTINCT Formation_idFormation as idForm
|
|
||||||
FROM GroupeTP
|
|
||||||
WHERE TP_idTP IN ( SELECT idTP FROM TP WHERE UE_code = ue2.code GROUP BY idForm )
|
|
||||||
)
|
|
||||||
)
|
|
||||||
GROUP BY `ue2`.`code`
|
GROUP BY `ue2`.`code`
|
||||||
) formlist ON formlist.code = ue.code
|
) formlist ON formlist.code = ue.code
|
||||||
$cond
|
##$cond
|
||||||
GROUP BY `ue`.`code`
|
GROUP BY `ue`.`code`
|
||||||
ORDER BY `ue`.`label` ASC");
|
ORDER BY `ue`.`label` ASC");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue