for j=0 to Ubound(eachNum)
ying = eachid(j)
dim rs6,sql6
set rs6 = Server.createObject("ADODB.Recordset")
sql6="select * from shop s,product p where s.sale_id='"&session("sale_id")&"' and s.id ='"& ying &"' and s.id=p.id "
rs6.Open sql6,conn,1,3
if not rs6.eof then
dim rs5,sql5
set rs5 = Server.createObject("ADODB.Recordset")
sql5="select * from shop where sale_id='"&session("sale_id")&"'"
rs5.Open sql5,conn,1,3
if not rs5.eof then
rs5.Fields("num")= eachNum(j)
rs5.Fields("total_price")= eachNum(j) * trim(rs6("price"))
rs5.Update
rs5.MoveNext
rs6.MoveNext
end if
end if
Next