Skip to content
Snippets Groups Projects
Commit f07466ff authored by Thomas Mewily's avatar Thomas Mewily
Browse files

delete

parent 39a146e7
No related branches found
No related tags found
No related merge requests found
......@@ -40,18 +40,21 @@ public class ProfDAO extends _Generic<ProfEntity> {
} catch (SQLException e) {
e.printStackTrace();
}
return null;
return obj;
}
@Override
public void delete(ProfEntity obj) {
delete(obj.getId());
}
public void delete(int id) {
try {
PreparedStatement stmt = this.connect.prepareStatement("DELETE FROM profs WHERE id = ?;");
stmt.setInt (1, obj.getId());
stmt.setInt (1, id);
ResultSet rs = stmt.executeQuery() ;
} catch (SQLException e) {
e.printStackTrace();
}
return;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment