Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int[] getContas() throws Exception {
- try {
- int i = 0;
- int[] nC = new int[2];
- String comando = "SELECT * FROM sql597954.Conta where id_user = ?";
- PreparedStatement ps = conectar.prepareStatement(comando);
- ps.setString(1, String.valueOf(idUsuarioLogado));
- ResultSet rs = ps.executeQuery();
- while(rs.next()){
- nC[i] = rs.getInt("ID_cont");
- i++;
- }
- rs.close();
- contas = nC.clone();
- return nC;
- } catch (Exception e) {
- throw e;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement