public void delete(Connection conn,int id){
DB db=new DB();
Statement stmt=db.createStamt(conn);
String sql="select * from article where pid="+id;
ResultSet rs=db.executeQuery(stmt,sql);
try{
while(rs.next()){
delete(conn,rs.getInt("id"));
}
String sqldel="delete * from article where id="+id;
Statement stmtdel=db.createStamt(conn);
stmtdel.executeUpdate(sqldel);
}catch(SQLException e){
e.printStackTrace();
}finally{
}
}