delitem.jsp
上传用户:apbaoyuan
上传日期:2021-02-12
资源大小:1015k
文件大小:1k
- <%@page import="java.sql.*"%>
- <%@page import="java.util.*"%>
- <%@include file="opendata.jsp"%>
- <%@include file="check.jsp"%>
- <%
- try{
- int itemid = Integer.parseInt(request.getParameter("itemid"));
- //out.print(itemid);
- int questionid = 0;
- sql = "SELECT QuestionID from Items where ItemID ="+itemid;
- rs = smt.executeQuery(sql);
- while(rs.next())
- questionid = rs.getInt(1);
-
- sql = "delete from Items where ItemID= "+itemid;
- smt.executeUpdate(sql);
- rs.close();
- smt.close();
- con.close();
-
-
-
- response.sendRedirect("edit.jsp?questionid="+questionid);
- }
- catch (Exception e) {
- e.getStackTrace();
- }
- %>