From: Pascal Corpet Date: Wed, 25 May 2005 12:44:32 +0000 (+0000) Subject: fix bug graph par promo casse pour les promos avec aucune inscription depuis un an X-Git-Tag: xorg/old~104 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=71225793dd9483f572cc2f42288253647b735418;p=platal.git fix bug graph par promo casse pour les promos avec aucune inscription depuis un an git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-658 --- diff --git a/htdocs/stats/graph_promo.php b/htdocs/stats/graph_promo.php index 03fc4ac..88616c6 100644 --- a/htdocs/stats/graph_promo.php +++ b/htdocs/stats/graph_promo.php @@ -27,6 +27,8 @@ $promo = Env::getInt('promo', Session::getInt('promo')); //nombre de jours sur le graph $JOURS=364; define('DUREEJOUR',24*3600); +$res = $globals->xdb->query("SELECT min(TO_DAYS(date_ins)-TO_DAYS(now())) FROM auth_user_md5 WHERE promo = {?} AND perms IN ('admin', 'user')", $promo); +$JOURS = -$res->fetchOneCell(); //recupere le nombre d'inscriptions par jour sur la plage concernée $res = $globals->xdb->iterRow(