public class BaseDAO {
public Connection getCon() throws SQLException{
return DBHelper.getCon();
}
public void realse(Connection con) throws SQLException{
DBHelper.realse(con);
}
public int execute(String sql) throws SQLException{
Connection con = getCon();
PreparedStatement stmt = getCon().prepareStatement(sql);
stmt.executeUpdate();
String res = stmt.getString(1);
realse(con);
return res;
}
}
0.
最新推荐文章于 2023-04-14 17:30:36 发布