Wow, thanks Oleg. 

-----Original Message-----
From: Oleg Gunkin [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 27, 2006 2:22 PM
To: CF-Talk
Subject: RE: Geting a list of query column names unsorted.


Phyo Pine, just use the following:
<cffunction name="getColumns" access="public" returntype="string">
        <cfargument name="query" required="yes" type="query">
                <cfreturn
ArrayToList(query.getMetaData().getColumnLabels())>
</cffunction>

--
Oleg Gunkin
Email: [EMAIL PROTECTED]
Phone: (604) 666-9392
Emerging Technologies / Pacific Web Services
Information Technology Services
Public Works and Government Services Canada (Pacific)

-----Original Message-----
From: Phyo Pine [mailto:[EMAIL PROTECTED]
Sent: Friday, January 27, 2006 13:15
To: CF-Talk
Subject: Re: Geting a list of query column names unsorted.


I am interested in the solution too. I was having the same trouble when
I was using <cfdump var="#queryname#"> as well. So the work-around I did
was instead of "SELECT c,a,b FROM someTable", I used "SELECT c as 1c, a
as 2a, b as 3b FROM someTable".

Hope this helps...

Regards,

Phyo Pine
Information Systems Specialist
DMV - ODOT




> 'query_name.columnlist' returns a sorted list of column names, but I
> really need it to be unsorted because for the query 'select c, a, b 
> from t' I need 'c,a,b' list, NOT 'a,b,c'. How do I get an unsorted 
> list of columns?
> 
> --
> Oleg Gunkin
> Email: [EMAIL PROTECTED]
> Phone: (604) 666-9392
> Emerging Technologies / Pacific Web Services
> Information Technology Services
> Public Works and Government Services Canada
(Pacific)





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230642
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to