Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ArrayList afficherListMaster(int mat) {
- // TODO Auto-generated method stub
- ArrayList list= new ArrayList<>();
- String msg= "SELECT * FROM postuler , specality WHERE postuler.matricule = "+mat+" and specality.id_spec = postuler.id_spec";
- Connection cnx =Mycnx.connect();
- try {
- Statement stat = cnx.createStatement();
- ResultSet res =stat.executeQuery(msg);
- while(res.next())
- {
- list.add(res.getString("specialiter"));
- }
- res.close();
- stat.close();
- cnx.close();
- } catch (SQLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }finally
- {
- return list;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment