如:
之前购了哪些产品,可以用
select buy_id,buy_no,price from buy where tuser_id="&session("user_id")&" and tpaper_id=0 and buy_wtime='"&wtime&"'
'tpaper_id=0表示订单表中没有次订单!
查出
之后又用此查询修改纪录
y=year(now)
m=month(now)
d=day(now)
wtime=y&"-"&m&"-"&d
rs.open "select buy_id,buy_no,price from buy where tuser_id="&session("user_id")&" and tpaper_id=0 and buy_wtime='"&wtime&"' ",conn,3,2
do while(not rs.eof)
if request.form("no"&rs("buy_id")&"")="" then
wrong="yes"
exit do
else
wrong="no"
rs("buy_no")=request.form("no"&rs("buy_id")&"")
rs.update
end if
rs.movenext
loop
rs.close