benniesanders
Programmer
I've never been good at this. I have some shopping cart software and I need to total the quantity of certain product numbers. Here's the array:
What I need to find out is the count of the products (acart(i,1)) that match product id 504, 505 or 506 and I'm just not smart enough to do that. Any help would be appreciated. Many thanks in advance.
Code:
acart=session("cart")
for i=lbound(acart) to ubound(acart)
[COLOR=#ff0000]acart(i,0) being the product ID and acart(i,1) being the quantity[/color]
if acart(i,0)<>"" and acart(i,1)<>"" then
set rscart=db.execute("select name,productid,price,saleprice,noship from products where productid=" & acart(i,0))
if acart(i,0)=504 or acart(i,0)=505 or acart(i,0)=506 then
'this is where I'm stuck
end if
...
What I need to find out is the count of the products (acart(i,1)) that match product id 504, 505 or 506 and I'm just not smart enough to do that. Any help would be appreciated. Many thanks in advance.