From: Vincent Le Gallic Date: Thu, 2 Mar 2017 14:54:03 +0000 (+0100) Subject: [activites.sh] On affiche les pseudos du responsable et du valideur X-Git-Url: http://gitweb.pimeys.fr/?a=commitdiff_plain;h=fe5c7a10d9bca76110e6eec0619abbf7309d66d1;p=scripts-20-100.git [activites.sh] On affiche les pseudos du responsable et du valideur --- 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;"