MoveMail.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 MoveMail extends DBManager {
-
- public static void MoveMailByBoxname(String box_name,int mail_id) {
- Connection conn = DBManager.getConnection();
- String sql = "update mail set box_name=? where id=?";
- PreparedStatement ps = null;
- try {
- ps=conn.prepareStatement(sql);
- ps.setString(1, box_name);
- ps.setInt(2, mail_id);
- ps.execute();
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- }