Delete.java
上传用户:liangcc
上传日期:2019-05-24
资源大小:4412k
文件大小:1k
- package com.softeem.webmail.dao.folder;
- import java.sql.Connection;
- import java.sql.PreparedStatement;
- import java.sql.SQLException;
- import com.softeem.webmail.dao.DBManager;
- public class Delete {
- private Connection conn;
-
- private PreparedStatement ps;
-
- public void deleteBoxByName(String sql){
- System.out.println(sql);
- conn = DBManager.getConnection();
- // String sql = "delete from mail where box_name = ? and ";
- try {
- ps = conn.prepareStatement(sql);
- // ps.setString(1, boxname);
- ps.executeUpdate();
- } catch (SQLException e) {
- e.printStackTrace();
- }finally{
- DBManager.closeConnection(null, ps, conn);
- }
- }
- }