delcomm_ok.jsp~2~
来自「JSP版的在线相册系统」· JSP~2~ 代码 · 共 24 行
JSP~2~
24 行
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>删除评论</title></head><body><jsp:useBean id="dbconn" scope="page" class="photo.DBConnection"/><%try{ int i=Integer.parseInt(request.getParameter("comment_id")); Connection conn=dbconn.getConnection(); Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY); String sql="delete from comments where comment_id="+i; stmt.executeUpdate(sql); //out.println("success!"); stmt.close(); conn.close(); response.sendRedirect("del_comment.jsp");}catch(Exception e){e.printStackTrace();} %></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?