then they've changed that behavior in CFMX.  To be honest, that doesn't
really surprise me at all given te need to do data typing and data type
translations for WebServices and Flash Remoting.  To be even more honest,
you should not EVER be thinking of a query as a structure of arrays.  I can
create a variable and think of it as a date, number, or string... but it's
none of these things in CFML until I treat it as such by operating on it
with CFML Functions.  If you need to use array or structure functionality -
you should be storing your data as a structure or array.  To do anything
else may not return errors all of the time, but there are so many reasons
not to - here are 3 big reasons:

1. Macromedia can change this "hidden" behavior in future versions
2. your code will not be backwards compatible at all
3. the resulting code will not be anywhere near as readable as it should be


~Simon

Simon Horwith
CTO, Etrilogy Ltd.
Member of Team Macromedia
Macromedia Certified Instructor
Certified Advanced ColdFusion MX Developer
Certified Flash MX Developer
CFDJList - List Administrator
http://www.how2cf.com/


-----Original Message-----
From: Rich Wild [mailto:[EMAIL PROTECTED]
Sent: 13 June 2003 14:35
To: '[EMAIL PROTECTED]'
Subject: RE: [ cf-dev ] Extracting values from a returned query


well, the following works:

<cfoutput>#arraylen(foo["col1"])#</cfoutput>

where foo is a query.

so does

arraytolist(foo["col1"])

> -----Original Message-----
> From: Stephen Moretti [mailto:[EMAIL PROTECTED]
> Sent: 13 June 2003 14:39
> To: [EMAIL PROTECTED]
> Subject: Re: [ cf-dev ] Extracting values from a returned query
>
>
> >
> > <cfif IsArray(data[listfirst(data.columnlist)])>
> > <cfoutput>
> > data[#listfirst(data.columnlist)#] is array<br>
> > </cfoutput>
> > </cfif>
> >
> > In CFMX tells you that "data" is a query and NOT a
> structure and that
> > data[columname] is an array.
> >
>
> So go on then... Next step... try the array functions on
> data[columnname]... ;o)
>
> I'm not saying it won't work, cos to be honest I don't know
> the answer, I
> just want you to do the work for me... ;oD
>
>
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
>


--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]






-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to