网站就差这一步了
<%
user_name=session("user_name")
sql="select * from basket where user_name='"&user_name&"' and basket_check=false "
rs.open sql,conn,3,3
if rs.eof then
response.write "You haven't ordered anything"
else
do while not rs.eof
%>
<tr>
<td width="195" height="25"><div align="center"><font color=red><%=rs("hw_name")%></font></div></td>
<td width="60" height="25"><div align="center"><%=rs("hw_cash")%><font face="Arial, Helvetica, sans-serif">Dollar</font></div></td>
<td width="60" height="25"><div align="center"><%=rs("basket_count")%></div></td>
<td width="80" height="25"><div align="center"><%=rs("hw_cash")*rs("basket_count")%><font face="Arial, Helvetica, sans-serif">Dollar</font></div></td>
</tr>
<%totalcash=totalcash+(rs("hw_cash")*rs("basket_count"))%>
<%rs.movenext
loop
end if
rs.close
%>
<%
username=session("user_name")
sql="select [basket.hw_cash],[basket.basket_count],[hw.hw_id] from basket,hw where basket.hw_id=hw.hw_id and hw.sort_id=46 and basket.user_name='"&username&"'and basket.basket_check=false "
106 rs.open sql,conn,3,3
if rs.eof then
pifa=0
else
do while not rs.eof
pifa=pifa+(rs("basket.hw_cash")*rs("basket.basket_count"))
rs.movenext
loop
rs.close
%>
<tr>
<td height="25"><div align="center"><b class="dz1">Total:<font color=red>
<% if totalcash-pifa<5000 then
response.write "<script language=JavaScript>{window.alert('please make sure your total prices more than $5000 expect wholesale goods');window.location.href='clear.asp';}</script>"
response.end
%>
<%else%>
<%=totalcash%>
<%end if%>
我想在总价中扣除批发商品的总价,可是一直报错,我检查过了basket表和hw表的字段名
错误类型:
Microsoft JET Database Engine (0x80004005)
/cash.asp, 第 106 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
页:
GET /cash.asp
时间:
2004年1月11日, 10:01:03
详细信息:
Microsoft 支持