📄 noworder.jsp
字号:
<html>
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.util.*"%>
<%@ page import="page.buyList"%>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>本次订单查询</title>
</head>
<body background="/images/BLUE3.JPG">
<p>您本次订的图书有:</p>
<table border="2" cellspacing="0" style="border-collapse: collapse" width="100%" id="table1" bordercolor="#008080">
<tr>
<td width="110">图书编号</td>
<td width="86">书名</td>
<td width="86">出版社</td>
<td width="100">出版日期</td>
<td width="86">作者</td>
<td width="100">所属类别</td>
<td width="80">价格</td>
<td width="110">所定册数</td>
</tr>
<%
Vector shop=new Vector();
shop=(Vector)session.getValue("shop");
String sql=new String();
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(ClassNotFoundException e)
{
out.println(e.toString());
}
Connection con = DriverManager.getConnection("jdbc:odbc:bookStore");
Statement stmt = con.createStatement();
try
{
for(int i=0;i<shop.size();i++)
{
buyList tempList=(buyList)shop.elementAt(i);
String bookID=tempList.bookID;
int bookNum=tempList.bookNum;
sql="SELECT * FROM book WHERE bookID='";
sql=sql+bookID;
sql=sql+"'";
ResultSet rs = stmt.executeQuery(sql);
rs.next();
%>
<p>
<tr>
<td width="110"><%=rs.getString("bookID")%> </td>
<td width="86"><%=rs.getString("bookName")%> </td>
<td width="86"><%=rs.getString("publisher")%> </td>
<td width="100"><%=rs.getString("pubDate")%> </td>
<td width="86"><%=rs.getString("bookAuthor")%> </td>
<td width="100"><%=rs.getString("bookSort")%> </td>
<td width="80"><%=rs.getString("bookPrice")%> </td>
<td width="110"><%=bookNum%> </td>
</tr></p>
<%
}
}
catch(Exception e)
{
out.println("对不起 ,您没有购买新书!!");
}
%>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -