📄 shanchujiushu.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@include file="sql2005_book.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="refresh" content="2;URL=guanlizhe.htm">
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE1 {color: #00CCFF}
-->
</style>
</head>
<%
request.setCharacterEncoding("GBK");
String bookid = request.getParameter("bookid").trim();
String sql1 = "select * from query where Bid = ?";
cstmt=conn.prepareCall(sql1);
cstmt.setString(1,bookid);
rs=cstmt.executeQuery();
if(!rs.next())
{
String sql = "{call deleteBookInfo(?)}";
cstmt=conn.prepareCall(sql);
cstmt.setString(1,bookid);
cstmt.executeUpdate();
rs.close();
cstmt.close();
conn.close();
%>
<script LANGUAGE="JavaScript">
alert("已成功从数据库中删除该书!")
</script>
<%}
else
{%>
<script language="javascript">
alert("这本书不在数据库中!或者这本书有用户正在使用,不能删除")
</script>
<%
rs.close();
cstmt.close();
conn.close();}
%>
<body>
<div align="center" class="STYLE1">两秒钟后页面自动跳回到管理者主页面</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -