 |
| |
if(isNull($SESSION[cust])){
?>
}
?>
|
購 物 交 易 記 錄 |
|
訂單編號 |
商品名稱 |
訂購數量 |
訂購日期 |
單價 |
$tot=0;
if(!isNull($mail)||($SESSION[cust]!="")){
$rs1=GetDB1("cust_mstr","id","mail='$mail'");
$fd="";
$fd.="o.no,";
$fd.="p.name,";
$fd.="os.price,";
$fd.="o.add_date";
if($SESSION[cust]!=""){
$result=GetDB2("order_mstr o,order_sub os,prod_mstr p",$fd,"p.no=os.prod_no and os.order_no=o.no order by o.no desc");
}else{
$result=GetDB2("order_mstr o,order_sub os,prod_mstr p",$fd,"p.no=os.prod_no and os.order_no=o.no and o.cust_id='$rs1' order by o.no desc");
}
//echo "select $fd from order_mstr o,order_sub os,prod_mstr p where p.no=os.prod_no and os.order_no=o.no and o.cust_id='$rs1'";
while($rs=mysql_fetch_array($result)){
$tot+=$rs[2];
?>
if($SESSION[cust]!=""){
echo " $rs[0]";
}else{
echo $rs[0];
}
?>
|
=$rs[1]?>
|
="1"?>
|
=$rs[3]?>
|
=$rs[2]?>
|
}
}
?>
|
總價
|
=$tot?>
|
|
|
 |
|