Search the web
Sign In
New User? Sign Up
CFTalk · ColdFusion Talk (CFTalk) List archives
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Get Query Column Names   Message List  
Reply | Forward Message #150671 of 154379 |
Re: Get Query Column Names


Thanks Scott... I was using the query.ColumnList as function instead of
variable/list :)

thanks man!

Regards,
Arsalan

--------------------------------------------------
From: "Arsalan Tariq Keen" <arsalkeen@...>
Sent: Sunday, July 12, 2009 12:42 AM
To: "cf-talk" <cf-talk@...>
Subject: Re: Get Query Column Names

>
> Hey Scott....
> this function query.ColumnList() is not documented in CF8 ... is it?
> I am asking this because its not working with me :(
>
> --------------------------------------------------
> From: "Scott Stroz" <boyzoid@...>
> Sent: Sunday, July 12, 2009 12:38 AM
> To: "cf-talk" <cf-talk@...>
> Subject: Re: Get Query Column Names
>
>>
>> Yep, you you are looking for queryName.columnlist.
>>
>> So if your query looks like this:
>>
>> <cfquery name="myTest" datasource="myDB">
>> SELECT * FROM xyz
>> </cfquery>
>>
>> You can get the list of columns by looking at myTest.columnList.
>>
>>
>> On Sat, Jul 11, 2009 at 2:25 PM, Arsalan Tariq
>> Keen<arsalkeen@...> wrote:
>>>
>>> Hi friends...
>>>
>>> Is there any way in CF8 with which I can get the list of column names my
>>> database query returns.
>>>
>>> For example I am using a query:
>>>
>>> SELECT * FROM xyz
>>>
>>> Is there any way to know which columns are returned??
>>>
>>>
>>> Regards,
>>> Arsalan
>>>
>>>
>>
>>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324444



Sat Jul 11, 2009 6:45 pm

mdinowit
Offline Offline
Send Email Send Email

Forward
Message #150671 of 154379 |
Expand Messages Author Sort by Date

Hi friends... Is there any way in CF8 with which I can get the list of column names my database query returns. For example I am using a query: SELECT * FROM...
archive@...
mdinowit
Offline Send Email
Jul 11, 2009
6:26 pm

Yep, you you are looking for queryName.columnlist. So if your query looks like this: <cfquery name="myTest" datasource="myDB"> SELECT * FROM xyz </cfquery> ...
archive@...
mdinowit
Offline Send Email
Jul 11, 2009
6:38 pm

Hey Scott.... this function query.ColumnList() is not documented in CF8 ... is it? I am asking this because its not working with me :( ... From: "Scott Stroz"...
archive@...
mdinowit
Offline Send Email
Jul 11, 2009
6:43 pm

Thanks Scott... I was using the query.ColumnList as function instead of variable/list :) thanks man! Regards, Arsalan ... From: "Arsalan Tariq Keen"...
archive@...
mdinowit
Offline Send Email
Jul 11, 2009
6:46 pm

You misread him. Do it exactly as he showed: <cfoutput>#yourquery.columnlist#</cfoutput> It isn't a function, but rather a property of the query itself. No ()....
archive@...
mdinowit
Offline Send Email
Jul 12, 2009
6:14 pm

Ouch - sorry - didn't scroll down enough to see your response. Sorry! ... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach...
archive@...
mdinowit
Offline Send Email
Jul 12, 2009
6:14 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help