* login process

* register page
* post query
* get query
This commit is contained in:
2019-09-27 10:58:13 +02:00
parent a495798aee
commit b78f31670f
13 changed files with 434 additions and 119 deletions

View File

@ -7,27 +7,33 @@ import java.sql.ResultSet;
import java.sql.SQLException;
public class jdcb {
public void executeQuery(String sql) {
String username;
String password;
String dbName;
public jdcb(String username, String password, String dbName) {
this.username = username;
this.password=password;
this.dbName = dbName;
}
public ResultSet executeQuery(String sql) {
Database db = new MySQLConnector(
"users",
"kOpaIJUjkgb9ur6S",
"127.0.0.1",
username,
password,
"192.168.65.15",
3306,
"wasteinformation");
dbName);
Connection c = db.getConnection();
try {
PreparedStatement stmt =
c.prepareStatement(sql);
ResultSet r = stmt.executeQuery();
DefaultTableModel model = Database.logToTable(r);
// this.resultTable.setModel(model);
return stmt.executeQuery();
} catch (SQLException e) {
e.printStackTrace();
}
return null;
}
}