%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="org.apache.jasper.tagplugins.jstl.core.ForEach"%>
<%@ page import="java.sql.ResultSet" %> <%--导入java.sql.ResultSet类 --%>
<%--创建com.tools.ConnDB类的对象 --%>
<%@ page import="java.util.Vector" %>
<%@ page import="com.model.Goodselement" %>
<%@ page import="java.text.DecimalFormat" %>
<%
String username=request.getParameter("username");
/* 顾客查询订单信息 */
ResultSet rs_odList = conn.executeQuery(
"select tb_goods.picture,tb_goods.goodsName,tb_order.OrderID,"
+"goodsID,number,tb_order.receiveName,tb_order.address,tb_goods.price "
+"from tb_order,tb_order_detail,tb_goods where username='"+username+"' "
+"and tb_order.orderID=tb_order_detail.orderID "
+"and tb_goods.ID=tb_order_detail.goodsID");
String odList_picture = "";
String odList_goodsName = "";
int odList_orderID = 0;
String odList_receiveName ="";
int odList_goodsID = 0;
int odList_number = 0;
String odList_address = "";
float odList_price=0;
%>
Insert title here
<%@ include file="common-header.jsp"%>
我的订单
商品图片 |
商品名称 |
订单号 |
购买数量 |
总价 |
收件人 |
收件地址 |
<% while(rs_odList.next()){
odList_picture=rs_odList.getString(1);
odList_goodsName=rs_odList.getString(2);
odList_orderID=rs_odList.getInt(3);
odList_goodsID=rs_odList.getInt(4);
odList_number=rs_odList.getInt(5);
odList_receiveName=rs_odList.getString(6);
odList_address=rs_odList.getString(7);
odList_price=rs_odList.getFloat(8);
%>
|
<%=odList_goodsName%>
|
<%=odList_orderID %> |
<%=odList_number %> |
<%=odList_price * odList_number%> |
<%=odList_receiveName %> |
<%=odList_address %> |
<%
}
%>
<%@ include file="common-footer.jsp"%>
<%-- ID号<%=odList_orderID%> --%>
<%-- 商品号<%=odList_goodsID%> --%>
<%-- 购买数量 <%=odList_number %> --%>
<%-- 收件人 <%=odList_receiveName %> --%>