I'm running the following function in java:
public boolean insert(User user) throws SQLException{
String sql = "insert into usuarios (nome, email, senha) values (?,?,?)";
PreparedStatement instruction = this.connection.prepareStatement(sql);
instruction.setString(1, user.getName());
instruction.setString(2, user.getEmail());
instruction.setString(3, user.getPassword());
boolean result = instruction.execute();
instruction.close();
return result;
}
The problem is that it always returns false in instruction.execute()
but if I make a select in users, it appears that it has been registered.