This commit is contained in:
pro.boooooo
2022-12-01 18:59:34 +01:00
parent 060c7c621e
commit 3bc0799992
8 changed files with 209 additions and 106 deletions

View File

@@ -219,6 +219,19 @@ public class BDatabase {
return listGroupe;
}
/**
*
* Recuperer le nombre de membre d'un groupe
*
* @param groupe_id le groupes
* @return le nombre de membre
* */
public int getMemberCount(int groupe_id) {
ArrayList<String> forCount = this.fetchAll(
"SELECT nom FROM fi_eleves WHERE groupe=" + groupe_id);
return forCount.size();
}
/**
* Recuperer l'hote courant.
@@ -251,16 +264,4 @@ public class BDatabase {
public String toString() {
return this.db_host + "\n" + this.db_name + "\n" + this.db_user + "\n";
}
/***
* Recupere le nombre d'etudiant par groupe
* @return
*/
/*public ArrayList<NBGroupe> getNbrEtuGroupes() {
ArrayList<NBGroupe> NGroupe = new ArrayList<>();
ArrayList<String> groupeNB = this.fetchAll("SELECT COUNT(DISTINCT groupe) FROM fi_eleves;");
for(int i = 0; i <= NGroupe.Goupe(groupeNB); i++) {
ArrayList<String> grpnb = this.fetchAll("Select count(id) from fi_eleves where groupe="+i+";");
}
}*/
}