function recupNbCom($idnews) { $BD = new BD('commentaire'); return $BD->count('idnews', $idnews); }
<div class="g3"></div> <div class="cols1"> <div class="circle white registered"> <span class="circle-span txt-center"><strong class="c-blue3"> <?php $BD = new BD('user'); echo $BD->countAll(); ?> </strong> Inscrit(s)</span> </div> </div> <div class="g1"></div> <div class="cols1"> <div class="circle white"> <span class="circle-span txt-center"><strong class="c-red2"><?php echo $BD->count('online', 1); ?> </strong> Connecté(s)</span> </div> </div> <div class="g1"></div> <div class="cols1"> <div class="circle white"> <span class="circle-span txt-center"><strong class="c-green2"><?php $BD->setUsedTable('event'); echo $BD->countAll(); ?> </strong> Event(s)</span> </div> </div> </div>
function countVehicule($id) { $BD = new BD('vehicule'); $res = $BD->count("iduser", $id); return $res; }
function countUserTrajet($idtrajet) { $BD = new BD('effectue'); return $BD->count("idtrajet", $idtrajet); }