-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsecession.java
More file actions
32 lines (27 loc) · 915 Bytes
/
Copy pathsecession.java
File metadata and controls
32 lines (27 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class secession {
void secessionPanel(String id) throws ClassNotFoundException {
Statement stmt = null;
ResultSet rs = null;
String url = "jdbc:mysql://localhost/users?serverTimezone=UTC&useSSL=false&&allowPublicKeyRetrieval=true&useSSL=false";
String sql = null;
Connection conn = null;
try {
Class.forName("com.mysql.cj.jdbc.Driver");
String user = "root", passwd = "000110";
conn = DriverManager.getConnection(url, user,passwd);
stmt = conn.createStatement();
sql = "delete member where id='" + id + "'";
rs = stmt.executeQuery(sql);
}catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
}