📄 kcyl.jsp
字号:
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="Connections/syxt.jsp" %>
<%
Driver DriverRecordset1 = (Driver)Class.forName(MM_syxt_DRIVER).newInstance();
Connection ConnRecordset1 = DriverManager.getConnection(MM_syxt_STRING,MM_syxt_USERNAME,MM_syxt_PASSWORD);
PreparedStatement StatementRecordset1 = ConnRecordset1.prepareStatement("SELECT pm,ph,scrq,sl FROM dbo.kc,dbo.ypms where kc.ypbh=ypms.ypbh");
ResultSet Recordset1 = StatementRecordset1.executeQuery();
boolean Recordset1_isEmpty = !Recordset1.next();
boolean Recordset1_hasData = !Recordset1_isEmpty;
Object Recordset1_data;
int Recordset1_numRows = 0;
%>
<%
int Repeat1__numRows = -1;
int Repeat1__index = 0;
Recordset1_numRows += Repeat1__numRows;
%>
<!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=utf-8" />
<title>库存余量</title>
</head>
<body>
<table width="712" height="68" border="1">
<tr>
<th height="25" scope="col">品名</th>
<th scope="col">批号</th>
<th scope="col">生产日期</th>
<th scope="col">余量</th>
</tr>
<% while ((Recordset1_hasData)&&(Repeat1__numRows-- != 0)) { %>
<tr align="center">
<td height="35"><%=(((Recordset1_data = Recordset1.getObject("pm"))==null || Recordset1.wasNull())?"":Recordset1_data)%></td>
<td><%=(((Recordset1_data = Recordset1.getObject("ph"))==null || Recordset1.wasNull())?"":Recordset1_data)%></td>
<td><%=(((Recordset1_data = Recordset1.getObject("scrq"))==null || Recordset1.wasNull())?"":Recordset1_data)%></td>
<td><%=(((Recordset1_data = Recordset1.getObject("sl"))==null || Recordset1.wasNull())?"":Recordset1_data)%></td>
</tr>
<%
Repeat1__index++;
Recordset1_hasData = Recordset1.next();
}
%>
</table>
</body>
</html>
<%
Recordset1.close();
StatementRecordset1.close();
ConnRecordset1.close();
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -