Anyone got any good articles (html) that I can have a look at.
I'm wanting to create something to hold a session based structure of the form: <cfset session.cart.item=1> <cfset session.cart.item.color=5> <cfset session.cart.item.row=231> etc... But its giving me errors. I've seen examples similar to this, so I'm wondering where I'm going wrong. Eventually I want 'color' and 'row' fields to be arrays, but first things first! -DV [Edited by DazV - 9/12/2002 8:56:26 PM] |
Seem to have things sussed now. All I need to know is how to append an array onto a structure
eg. I want: cart.item[].qty At the moment I have: item[].qty I need to know the instruction that can append item[].qty onto the cart structure to make cart.item[].qty [Edited by Darren (M3) - 9/13/2002 2:41:11 PM] |
:rolleyes:
...i've sent the question... ;) |
Cheers Rich, you're a lifesaver! The answer your man gave me was perfect for what I need to know.
What did you say your internet hosting company was again ? :) |
No problem, Datacenta but I won't post a link just in case I get accused of advertising! :rolleyes: ;)
BTW - We can host Cold Fusion sites, not sure if you knew that... |
Ok, finally managed to track something down on the net.
Stuctures within structures, arrays within structures, etc... Out of interest, could anyone tell me how to setup this... #cart.item[1].qty# I did it like this but I'm not sure about the line in bold type <!--- Step1. Define the variables ---> <CFSET var_qty=15> <CFSET var_merchID=246> <!--- Step2 Create a structure 'struct_item' to contain those variables ---> <CFSET struct_item=StructNew()> <CFSET stuct_item.merchID=var_merchID> <CFSET struct_item.qty=var_qty> <!--- Step3 Define the array 'array_item' ---> <CFSET array_item=ArrayNew(1)> <CFSET array_item[1]=struct_item> <CFSET array_item[2]=struct_item> Are those last two lines in bold correct ? I was hoping to simply replace them with one line which reads: <CFSET array_item=struct_item> [Edited by DazV - 9/12/2002 11:40:35 PM] |
All times are GMT +1. The time now is 02:31 AM. |
© 2024 MH Sub I, LLC dba Internet Brands