affichage nombres apparitions num 1, recuperation taille de la table
This commit is contained in:
parent
f8ff9b93fb
commit
655ad1552d
2 changed files with 24 additions and 2 deletions
|
|
@ -26,6 +26,27 @@ public class Choix {
|
||||||
public long num2_bonusCpt[];
|
public long num2_bonusCpt[];
|
||||||
public long num3_bonusId[][];
|
public long num3_bonusId[][];
|
||||||
public long num3_bonusCpt[];
|
public long num3_bonusCpt[];
|
||||||
|
public long taille;
|
||||||
|
|
||||||
|
public void setTaille(){
|
||||||
|
try {
|
||||||
|
conn = maDB.getConnection();
|
||||||
|
if (conn != null) {
|
||||||
|
Statement ps = conn.createStatement();
|
||||||
|
ResultSet rs=ps.executeQuery("SELECT Count(*) From myny.Test_Table");
|
||||||
|
rs.next();
|
||||||
|
long nbcolret= rs.getLong(1);
|
||||||
|
conn.commit();
|
||||||
|
System.out.println("statement cree");
|
||||||
|
taille =nbcolret;
|
||||||
|
System.out.println(taille);
|
||||||
|
}
|
||||||
|
} catch (SQLException e) {
|
||||||
|
System.out.println("chiffre1 probleme");
|
||||||
|
System.out.println(e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
public Choix(){
|
public Choix(){
|
||||||
maDB=new DataBase();
|
maDB=new DataBase();
|
||||||
maDB.getConnection();
|
maDB.getConnection();
|
||||||
|
|
@ -112,7 +133,7 @@ public class Choix {
|
||||||
//j=0;
|
//j=0;
|
||||||
}
|
}
|
||||||
for (int i=1; i<50;i++) {
|
for (int i=1; i<50;i++) {
|
||||||
System.out.println(i+":");
|
System.out.println(i+":"+numCpt[i][1]);
|
||||||
while(numId[i][l]!=0){
|
while(numId[i][l]!=0){
|
||||||
System.out.print(numId[i][l]+", ");
|
System.out.print(numId[i][l]+", ");
|
||||||
l++;
|
l++;
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,13 @@ public class test{
|
||||||
|
|
||||||
|
|
||||||
Choix c=new Choix();
|
Choix c=new Choix();
|
||||||
|
c.setTaille();
|
||||||
//c.afficherChiffre1();
|
//c.afficherChiffre1();
|
||||||
//c.afficherNumBonus();
|
//c.afficherNumBonus();
|
||||||
//c.afficherCombinaisons2(4);
|
//c.afficherCombinaisons2(4);
|
||||||
//c.afficherNumBonus(1);
|
//c.afficherNumBonus(1);
|
||||||
//c.afficherCombinaisons3(32,16);
|
//c.afficherCombinaisons3(32,16);
|
||||||
c.afficherNumBonusCombi2(5,10);
|
//c.afficherNumBonusCombi2(5,10);
|
||||||
//c.afficherNumBonusCombi3(28,14,37);
|
//c.afficherNumBonusCombi3(28,14,37);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in a new issue