public boolean update(Team team) { try { this.connect .createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY) .executeUpdate( "UPDATE teams SET te_points =" + team.getPoints() + "WHERE te_id = " + team.getID()); } catch (SQLException e) { e.printStackTrace(); return false; } return true; }
public boolean create(Team team) { try { this.connect .createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY) .executeUpdate( "INSERT INTO teams VALUES (" + team.getID() + "," + team.getPoints() + ")"); } catch (SQLException e) { e.printStackTrace(); return false; } return true; }