From 10529f682788ccb3067480600e3fc7d787da1d7f Mon Sep 17 00:00:00 2001 From: EmmanuelTiamzon Date: Tue, 16 Sep 2025 12:30:12 +0200 Subject: [PATCH] update --- DEV.3.1/TP/TP1/Vote.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DEV.3.1/TP/TP1/Vote.java b/DEV.3.1/TP/TP1/Vote.java index 325868d..099c774 100644 --- a/DEV.3.1/TP/TP1/Vote.java +++ b/DEV.3.1/TP/TP1/Vote.java @@ -11,8 +11,9 @@ public class Vote { Connection cnx = DriverManager.getConnection("jdbc:mariadb://dwarves.iut-fbleau.fr/srivasta","srivasta", "Tiamzon2006"); try{ - PreparedStatement req = cnx.prepareStatement("SELECT * FROM tp1_points;"); + PreparedStatement req = cnx.prepareStatement("SELECT Votants, Points FROM tp1_points WHERE Compétiteur = "(?)";"); ResultSet rs = req.executeQuery(); + req.setString(1, this.pays); while(rs.next()) { System.out.print(rs.getInt(2)+" ");