MoveToLaji.java
上传用户:liangcc
上传日期:2019-05-24
资源大小:4412k
文件大小:1k
- package com.softeem.webmail.sendbox;
- import java.sql.Connection;
- import java.sql.PreparedStatement;
- import java.sql.SQLException;
- import com.softeem.webmail.dao.DBManager;
- public class MoveToLaji {
- public void moveToLaji(int id,String box_name){
- Connection con = DBManager.getConnection();
- String sql = "update mail set box_name = '"+box_name+"' where id = ?";
- try {
- PreparedStatement ps = con.prepareStatement(sql);
- ps.setInt(1, id);
- ps.execute();
- } catch (SQLException e) {
- e.printStackTrace();
- }finally{
- DBManager.closeConnection(null, null, con);
- }
-
- }
- }