How do I inform if the user already exists when I press the save button?

Asked

Viewed 51 times

0

How do I press save button and inform if user already exists.

  public void salvar(){
   String comando = "";
   if (this.getId() == -1){
      comando = String.format("INSERT INTO cadastro (nomedousuario, senha) 
            VALUES ('%s','%s');");
    }
  • 1

    Make a select by checking if the user name already exists.

  • I made it here, thanks.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.