DeleteMail.java
上传用户:liangcc
上传日期:2019-05-24
资源大小:4412k
文件大小:1k
- package com.softeem.webmail.dao.mail;
- import java.sql.Connection;
- import java.sql.PreparedStatement;
- import java.sql.SQLException;
- import com.softeem.webmail.dao.DBManager;
- public class DeleteMail extends DBManager{
-
- public static void DeleteMailById(int id){
- Connection conn=DBManager.getConnection();
- String sql="delete from mail where id=?";
- PreparedStatement ps;
- try {
- ps = conn.prepareStatement(sql);
- ps.setInt(1, id);
- ps.execute();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- }