X-Git-Url: http://gitweb.pimeys.fr/?a=blobdiff_plain;f=bde%2Factivites.sh;h=7408d229f52112e0e49b2e32df7b425f14d66303;hb=ae1c96ff21bdfe773fab67a92d3404d13d616dce;hp=82ff1114176ceda3428c19bacd45590d72d99b0b;hpb=2080de96607fd8b7a692b360ecf0b67862228480;p=scripts-20-100.git diff --git a/bde/activites.sh b/bde/activites.sh index 82ff111..7408d22 100755 --- a/bde/activites.sh +++ b/bde/activites.sh @@ -13,7 +13,11 @@ done if [ "${pot}" = "1" ] then - WHERE="WHERE titre ILIKE '%pot%' " + CLAUSEPOT="AND titre ILIKE '%pot%'" fi -psql note -c "SELECT * FROM activites ${WHERE}ORDER BY debut DESC;" +psql note -c "SELECT cresp.pseudo AS responsablepseudo, cval.pseudo AS valideparpseudo, a.* + FROM activites AS a, comptes AS cresp, comptes AS cval + WHERE a.responsable = cresp.idbde AND a.validepar = cval.idbde + ${CLAUSEPOT} + ORDER BY debut DESC;"