示例#1
0
  @Override
  public void insertRegistry(UserAccount account) throws java.sql.SQLException {
    String query =
        "INSERT INTO user VALUES "
            + "(NULL,'"
            + account.getName()
            + "','"
            + account.getLogin()
            + "','"
            + account.getPassword()
            + "','"
            + account.getEmail()
            + "');";

    MySql.stm.executeUpdate(query);
  }
示例#2
0
  @Override
  public void alterRegistry(UserAccount account) throws java.sql.SQLException {

    String query =
        "UPDATE user SET name =\" "
            + account.getName()
            + "\",login = \""
            + account.getLogin()
            + "\",password =\""
            + account.getPassword()
            + "\", email = \""
            + account.getEmail()
            + "\"WHERE iduser = "******";";

    MySql.stm.executeUpdate(query);
  }