1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
$Req1="SELECT sum (A1.[1]),sum (A1.[2]),sum (A1.[3]),sum (A1.[4]),sum (A1.[5]),sum (A1.[6]),
sum (A1.[7]),sum (A1.[8]),sum (A1.[9]),sum (A1.[10]),sum (A1.[11]),sum (A1.[12]),sum (A1.[13]),sum (A1.[14]),sum (A1.[15]),
sum (A1.[16]),sum (A1.[17]),sum (A1.[18]), sum (A1.[19]),sum (A1.[20]),sum (A1.[21]),sum (A1.[22]),sum (A1.[23]),sum (A1.[24]),
sum (A1.[25]),sum (A1.[26]),sum (A1.[27]),sum (A1.[28]),sum (A1.[29]),sum (A1.[30]),sum (A1.[31])
FROM T_Codes_Evenements AS A2 INNER JOIN
T_MDAJour_AnalyseCroise AS A1 on A2.code=A1.CODEVT WHERE $critere AND Populo='$populo'
AND A2.TRI in(0,1,3);";
$Req2="SELECT sum (B1.[1]),sum (B1.[2]),sum (B1.[3]),sum (B1.[4]),sum (B1.[5]),sum (B1.[6]),
sum (B1.[7]),sum (B1.[8]),sum (B1.[9]),sum (B1.[10]),sum (B1.[11]),sum (B1.[12]),sum (B1.[13]),sum (B1.[14]),sum (B1.[15]),
sum (B1.[16]),sum (B1.[17]),sum (B1.[18]), sum (B1.[19]),sum (B1.[20]),sum (B1.[21]),sum (B1.[22]),sum (B1.[23]),sum (B1.[24]),
sum (B1.[25]),sum (B1.[26]),sum (B1.[27]),sum (B1.[28]),sum (B1.[29]),sum (B1.[30]),sum (B1.[31])
FROM T_Codes_Evenements AS B2 INNER JOIN
T_MDAJour_AnalyseCroise AS B1 on B2.code=B1.CODEVT WHERE $critere AND Populo='$populo'
AND B2.TRI in( 2);";
$sql=" $Req1- $Req2;";
$id_result = odbc_exec($id_odbc,$sql);//execute la requête |
Partager