How do I tell if the user already exists when I hit the save button?

0

How do I do this when I press the save button and tell if the user already exists.

  public void salvar(){
   String comando = "";
   if (this.getId() == -1){
      comando = String.format("INSERT INTO cadastro (nomedousuario, senha) 
            VALUES ('%s','%s');");
    }
    
asked by anonymous 25.03.2016 / 01:14

0 answers