Commit 49fbbb65 authored by okhin's avatar okhin 🚴

Merge branch '31-deompte-des-contreparties-bancal' into 'preprod'

Resolve "Décompte des contreparties bancal"

Closes #31

See merge request !4
parents 14284142 e8f39a40
Pipeline #2004 passed with stages
in 1 minute and 20 seconds
......@@ -41,10 +41,10 @@ class Perso extends Controller
// printed piplome is 30, pibag is 50, pishirt is 100 and hoodie is 250
// We first need to have the number of each counterpart claimed by the
// user
$cumul_counterpart = $db->query("SELECT count(if(quoi='piplome', 1, 0)) as piplomes,
count(if(quoi='pibag', 1, 0)) as pibags,
count(if(quoi='pishirt', 1, 0)) as pishirts,
count(if(quoi='hoodie', 1, 0)) as hoodies
$cumul_counterpart = $db->query("SELECT sum(if(quoi='piplome', 1, 0)) as piplomes,
sum(if(quoi='pibag', 1, 0)) as pibags,
sum(if(quoi='pishirt', 1, 0)) as pishirts,
sum(if(quoi='hoodie', 1, 0)) as hoodies
FROM contreparties
WHERE user_id = '".$f3->get('SESSION.id')."';");
$cumul_counterpart = $cumul_counterpart->fetch(\PDO::FETCH_ASSOC);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment