Here is some code I use loop over a recordset (rs)
and creates an array of structure with is stored as WDDX

<cfset MyArray = ArrayNew(1)>
<cfloop query=rs>
        
        <cfscript>
        tmp = StructNew();
        tmp.ID = #id#;
        tmp.StatusCode = #statusid#;
        // add current thing to list    
        MyArray[rs.CurrentRow] = tmp;   
                                
        </cfscript>             
</cfloop>

Justin 

><cfscript>
>    history=ArrayNew(1);
>    order=StuctNew();
>    StructInsert(order, "id", "0001");
>    StructInsert(order, "date", "01/01/2001");
>    history[1]=order;
>    StructClear(order);
>    StuctInsert(order, "id", "0002");
>    StrictInsert(order, "date", "01/02/2001");
>    history[2]=order;
></cfscript>
>
>I then serialize and store the data.  However what happends is 
>that the "history" array has a length of two, but both are set to 
>the second structures values.  Any ideas??
>
>Thanks in advance,
>
>
>Greg
>
>
>
~~~~~~~~~~~~~ Paid Sponsorship ~~~~~~~~~~~~~
Get Your Own Dedicated Win2K Server!      Instant Activation for $99/month w/Free 
Setup from SoloServer      PIII600 / 128 MB RAM / 20 GB HD / 24/7/365 Tech Support     
 Visit SoloServer, https://secure.irides.com/clientsetup.cfm.

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to