<cffunction name="RowToStruct">
                <cfargument name="qry">
                <cfargument name="rownumber">
                <cfscript>
                        var i = 0;
                        var retval = structnew();

                        for(i=1;i lte listlen(arguments.qry.columnlist);i=i+1){
                                
retval[LCase(listgetat(arguments.qry.columnlist,i))] =
arguments.qry[listgetat(arguments.qry.columnlist,i)][arguments.rownumber];
                        }
                </cfscript>
                <cfreturn retval>
        </cffunction>

-----Original Message-----
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED]
Sent: 16 August 2005 16:01
To: CF-Talk
Subject: RE: Copy record from query into structure


I think you will have to make it into an Array of Structs rather than a
Struct itself.  Where each Array node is an equivalent row number.





-----Original Message-----
From: Robert Everland III [mailto:[EMAIL PROTECTED]
Sent: 16 August 2005 15:27
To: CF-Talk
Subject: Copy record from query into structure

Is there a way to copy an entire record from a query into a structure. I can
reference the query like query["rowname"][rownumber] but when you try to
reference it as query[rownumber] it errors out.



Bob





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215224
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to