34 lines
615 B
Java
34 lines
615 B
Java
import java.sql.*;
|
|
|
|
public class Vote {
|
|
|
|
private String[] pays;
|
|
|
|
public Vote(String[] args) {
|
|
this.pays = pays;
|
|
}
|
|
|
|
public Vote() {
|
|
|
|
try{
|
|
Connection cnx = DriverManager.getConnection("jdbc:mariadb://dwarves.iut-fbleau.fr/srivasta","srivasta", "Tiamzon2006");
|
|
|
|
PreparedStatement pst = cnx.prepareStatement("SELECT * FROM tp1_pays AND tp1_vote;");
|
|
|
|
|
|
ResultSet rs = pst.executeQuery();
|
|
|
|
pst.close();
|
|
rs.close();
|
|
cnx.close();
|
|
} catch(SQLException e) {
|
|
System.err.println("Erreur de connexion : "+e);
|
|
|
|
}
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
Vote vote = new Vote();
|
|
|
|
}
|
|
} |