Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 01:07 PM
Alont
Guest
 
Posts: n/a
Default Are arrCart here is a Table?

this source code form a shopping-cart, I'm confuseing on the array of
"arrCart", is it a table? a multidimensional array seems like a table
from the view of data structure?
add a new record to a array is so simple:?
arrCart(cProductid,scartItem) = lngcatalogID
in ASP, the declaration of declare a multidimensioanl array is same to
a variety? don't need to care about the amount of element?
Dim arrCart
arrCart(cProductid,scartItem) = lngcatalogID
could consider that "cProductid" and "scartItem" as a field?
maybe my word have confused you, wish you could know my question :-)

<%
'******CartAddItem
dim mycolor
Sub CartAddItem(id, rc)
' Return 0 if added, 4 if product does not exist
' Get from datbase and add to instorage array
dim scartitem
Dim arrCart
Dim TotalOptionPrice
Dim Optionname
CartGetProduct Id, rc
if rc = 0 then
arrCart = Session("MyCart")
scartItem = Session("cartItem")
scartitem=scartitem+1
Session("cartItem")=scartitem
arrCart(cProductid,scartItem) = lngcatalogID
arrCart(cProductCode,scartItem) = strccode
arrCart(cProductname,scartItem) = strcname
If isnumeric(quantity) then
arrCart(cQuantity,scartItem) = CInt(quantity)
else
arrCart(cQuantity,scartItem) = 1
end if
arrCart(cUnitPrice,scartItem) = curCprice +
TotaloptionPrice
Session("MyCart")=arrCart
end if
end sub
%>



I'm sorry my english is so poor,
so forgive me if my word had make you uncomfortable.
I'll try my best to express my question correctly
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles