gestion/controle_don/get_all.sh

22 lines
799 B
Bash
Executable File

#!/bin/bash
PASSWORD=$(cat ~/.secret/gestion_api_password)
requete=$(curl https://api666:$PASSWORD@gestion.a-lec.org/api/sql/ -s -d 'SELECT * FROM
services_users su
INNER JOIN membres m ON m.id = su.id_user
INNER JOIN services_fees sf ON sf.id = su.id_fee
LEFT JOIN acc_transactions_users tu ON tu.id_service_user = su.id
LEFT JOIN acc_transactions_lines l ON l.id_transaction = tu.id_transaction
WHERE m.id = 3 AND l.id_account = 481;')
# Note: su.id_service = 1 parceque la cotisation correspond au service 1
echo $requete
exit 0
PASSWORD=$(cat ~/.secret/gestion_api_password)
requete=$(curl https://api666:$PASSWORD@gestion.a-lec.org/api/sql/ -s -d 'SELECT * FROM
acc_transactions_lines;')
# Note: su.id_service = 1 parceque la cotisation correspond au service 1
echo $requete