Manage Legal Notices - Delete
[habeas.git] / src / habeas / Utility.java
index f7fdae7..aac247c 100644 (file)
@@ -360,6 +360,22 @@ public class Utility {
             return false;
         }
         
+    }
+
+    static boolean deleteNotice(int r) {
+        try {
+            Connection conn = DriverManager.getConnection(JDBC + connectionURL);
+            PreparedStatement st = conn.prepareStatement("DELETE FROM legalnotices"
+                    + " WHERE id=?;");
+            st.setInt(1, r);
+            st.execute();
+            conn.close();
+            return true;
+        } catch (SQLException ex) {
+            Logger.getLogger(Utility.class.getName()).log(Level.SEVERE, null, ex);
+            return false;
+        }
+        
     }
     public Utility () {