⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 core_close_save.jsp

📁 JavaWeb标签应用开发(随书光盘)为方便读者阅读本书和调试程序
💻 JSP
字号:
<%@ page contentType="text/html;charset=GB2312" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
<html>
  <body bgcolor="#DCDADA">
  <!-------作更新操作的SQL语句-------->
  <c:set var="updateSQL"
  	value="update core set close_status=1
  		 where lession_id=? and student_id in
  		  (select student_id from student where class_id=?)"/>
  <!------设置数据源------>
  <sql:setDataSource dataSource="jdbc/sqlserver" var="sqlDS"/>
  <!------作数据库操作------>
  <c:if test="${(not empty param.lession_id) and (not empty param.class_id)}">
  		<sql:update sql="${updateSQL}" 
  			var="infecCount" dataSource="${sqlDS}">
  			<sql:param value="${param.lession_id}"/>
  			<sql:param value="${param.class_id}"/>
  		</sql:update>
  		<c:if test="${infecCount>=1}">
  			封存成功!
  		</c:if>
  		<c:if test="${infecCount<1}">
  			封存失败!
  		</c:if>
  </c:if>  
    <br><a href="core_close.jsp">返回</a>
  </body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -