Préparation StatsUtilisateurs
This commit is contained in:
parent
875a7cd30f
commit
9edc2e6e3a
@ -2680,12 +2680,21 @@ class Interne extends WsScore
|
|||||||
$strPayant='';
|
$strPayant='';
|
||||||
}
|
}
|
||||||
$iDbCrm = new WDB('sdv1');
|
$iDbCrm = new WDB('sdv1');
|
||||||
if ($type=='jour'){
|
if ($type=='jour') {
|
||||||
$rep = $iDbCrm->select('logs', 'date(dateHeure) as jours, count(*) as nb', "1 $strPayant AND login='$login' AND dateHeure BETWEEN '$mois-01' AND '$mois-31' GROUP BY jours", true, MYSQL_ASSOC);
|
$rep = $iDbCrm->select('logs',
|
||||||
}elseif ($type=='heure'){
|
'date(dateHeure) as jours, count(*) as nb',
|
||||||
$rep = $iDbCrm->select('logs', 'HOUR(dateHeure) as heures, count(*) as nb', "1 $strPayant AND login='$login' AND dateHeure BETWEEN '$mois-01' AND '$mois-31' GROUP BY heures", true, MYSQL_ASSOC);
|
"1 $strPayant AND login='$login' AND dateHeure BETWEEN '$mois-01' AND '$mois-31' GROUP BY jours",
|
||||||
|
true, MYSQL_ASSOC);
|
||||||
|
} elseif ($type=='heure') {
|
||||||
|
$rep = $iDbCrm->select('logs',
|
||||||
|
'HOUR(dateHeure) as heures, count(*) as nb',
|
||||||
|
"1 $strPayant AND login='$login' AND dateHeure BETWEEN '$mois-01' AND '$mois-31' GROUP BY heures",
|
||||||
|
true, MYSQL_ASSOC);
|
||||||
}
|
}
|
||||||
$tabRet = $rep;
|
$tabRet = $rep;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return array('error'=>array('errnum'=>0, 'errmsg'=>''), 'results'=>$tabRet);
|
return array('error'=>array('errnum'=>0, 'errmsg'=>''), 'results'=>$tabRet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user