Aide sur Distinct dans Select & Java
supupoff
Messages postés
350
Statut
Membre
-
supupoff Messages postés 350 Statut Membre -
supupoff Messages postés 350 Statut Membre -
Bonjour,
je veux afficher dans JCombobox la resultat d'une select tout en afficher pour RefProjet une seul fois,
mon essai :
rs =c.selection("SELECT RefProjet,idpro,NomProjet FROM projet,user where projet.iduser=user.id AND projet.IdChef='"+a.getid()+"' AND RefProjet in (select distinct(RefProjet) from projet)");
while(rs.next())
{
String num = rs.getString("idpro");
String nom = rs.getString("NomProjet");
String ref = rs.getString("IdProjet");
jComboBox2.addItem(new RF(nom,ref,num));
} } catch (Exception ex) {
ex.printStackTrace();
}
mais toujour m'affiche plusieur fois même RefProjet !!
aide svp
Merci d'avance
--
La chance aide parfois, le travail toujours.
je veux afficher dans JCombobox la resultat d'une select tout en afficher pour RefProjet une seul fois,
mon essai :
rs =c.selection("SELECT RefProjet,idpro,NomProjet FROM projet,user where projet.iduser=user.id AND projet.IdChef='"+a.getid()+"' AND RefProjet in (select distinct(RefProjet) from projet)");
while(rs.next())
{
String num = rs.getString("idpro");
String nom = rs.getString("NomProjet");
String ref = rs.getString("IdProjet");
jComboBox2.addItem(new RF(nom,ref,num));
} } catch (Exception ex) {
ex.printStackTrace();
}
mais toujour m'affiche plusieur fois même RefProjet !!
aide svp
Merci d'avance
--
La chance aide parfois, le travail toujours.
A voir également:
- Aide sur Distinct dans Select & Java
- Jeux java itel - Télécharger - Jeux vidéo
- Waptrick java football - Télécharger - Jeux vidéo
- Java apk - Télécharger - Langages
- Jeux java itel touche ✓ - Forum Logiciels
- Jeux java itel 5360 - Forum Mobile