There's also a UDF on cflib.org that does this.
-d

----- Original Message -----
From: "Ryan Mitchell" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, November 19, 2003 7:14 AM
Subject: Re: Query to structure

> Thanks :)
>
> On 19/11/03 12:51 pm, "Tim Blair" <[EMAIL PROTECTED]> wrote:
>
> > Ryan,
> >
> >> > I want to take the query and convert it to a structure, with
> >> > the key being the column name and the value being the value
> >> > of the column...
> >
> > Simply loop over the column list:
> >
> > <cfset mystruct = structnew()>
> > <cfloop list="#myquery.columnList#" index="col">
> >     <cfset mystruct[col] = myquery[col]>
> > </cfloop>
> >
> > Tim.
> >
> > -------------------------------------------------------
> > RAWNET LTD - Internet, New Media and ebusiness Gurus.
> > Visit our new website at http://www.rawnet.com for
> > more information about our company, or call us free
> > anytime on 0800 294 24 24.
> > -------------------------------------------------------
> > Tim Blair
> > Web Application Engineer, Rawnet Limited
> > Direct Phone : +44 (0) 1344 393 441
> > Switchboard : +44 (0) 1344 393 040
> > -------------------------------------------------------
> > This message may contain information which is legally
> > privileged and/or confidential.  If you are not the
> > intended recipient, you are hereby notified that any
> > unauthorised disclosure, copying, distribution or use
> > of this information is strictly prohibited. Such
> > notification notwithstanding, any comments, opinions,
> > information or conclusions expressed in this message
> > are those of the originator, not of rawnet limited,
> > unless otherwise explicitly and independently indicated
> > by an authorised representative of rawnet limited.
> >
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to