RE: Query column index number

2005-11-02 Thread Steve Milburn
Sorry for that stupid piece of code I just posted a few minutes ago. Trying to type too fast and answers phones and talk to others all at the same time. Here is a better illustration of what I want: cfquery name=qry datasource=test Select * from table /cfquery cfoutput query=qry

Re: Query column index number

2005-11-02 Thread Robert Everland III
cfquery name=qry datasource=test #qry.column[qry.currentrow]# /cfquery ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project

re: Query column index number

2005-11-02 Thread Jeff Garza
I don't think that this is possible by number alone. Columns are akin to keys in a structure. Rows are like an array. You could possibly loop over the column list and try to access your columns that way. But beware that the column list will not be returned in the same order that you

RE: Query column index number

2005-11-02 Thread Justin D. Scott
How can I refer to a column in my query by it's position in the query, or an index number, rather than the name of the column? For example Each query includes a variable called columnList that you can look at. cfoutput query=qry #evaluate(qry. listGetAt(qry.columnList, 2))# /cfoutput

RE: Query column index number

2005-11-02 Thread Ian Skinner
cfoutput query=qry #evaluate(qry. listGetAt(qry.columnList, 2))# /cfoutput OR to remove the evaluate function call. cfoutput query=qry #qry[listGetAt(qry.columnlist,2)]# /cfoutout The caveat here is that columnlist is not in same order as the select clause. -- Ian

RE: Query column index number

2005-11-02 Thread Justin D. Scott
OR to remove the evaluate function call. cfoutput query=qry #qry[listGetAt(qry.columnlist,2)]# /cfoutout That would be great, if it worked. Query objects cannot be accessed like structures. Query columns can (qry.col[row]), but not the query itself. Throws a Complex object types

RE: Query column index number

2005-11-02 Thread Steve Milburn
#/cfoutput. Beside, I don't even know what the column names will be as they are subject to change. Thanks for your help -Original Message- From: Justin D. Scott [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 02, 2005 2:26 PM To: CF-Talk Subject: RE: Query column index number How can I

RE: Query column index number

2005-11-02 Thread Justin D. Scott
Have you tried using de() within your evaluate to get past the icky column names? -Justin -Original Message- From: Steve Milburn [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 02, 2005 2:44 PM To: CF-Talk Subject: RE: Query column index number Yes, I know, and I am using

RE: Query column index number

2005-11-02 Thread Ian Skinner
What you may need to do is escape those #'s, which of course means doubling them up so they become ##'s. Some basic string manipulation would do this. Then some of the previous attempts should work. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA C

Re: Query column index number

2005-11-02 Thread Ryan Guill
: Have you tried using de() within your evaluate to get past the icky column names? -Justin -Original Message- From: Steve Milburn [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 02, 2005 2:44 PM To: CF-Talk Subject: RE: Query column index number Yes, I know, and I am

Re: Query column index number

2005-11-02 Thread Ryan Guill
Can someone tell me if my reply came through just a second ago? I got one of those body too long messages, but it doesnt tell me if my message actually goes through anyway or not. On 11/2/05, Ian Skinner [EMAIL PROTECTED] wrote: What you may need to do is escape those #'s, which of course means

Re: Query column index number

2005-11-02 Thread Ray Champagne
It always goes through. That's just a warning that you need to trim. Ryan Guill wrote: Can someone tell me if my reply came through just a second ago? I got one of those body too long messages, but it doesnt tell me if my message actually goes through anyway or not. On 11/2/05, Ian

RE: Query column index number

2005-11-02 Thread Ian Skinner
Yes, that message is just a warning to remind you to trim posts if you are replying. The message still goes through. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA C code. C code run. Run code run. Please! - Cynthia Dunning Confidentiality Notice:

Re: Query column index number

2005-11-02 Thread Ryan Guill
ah, thanks. On 11/2/05, Ray Champagne [EMAIL PROTECTED] wrote: It always goes through. That's just a warning that you need to trim. Ryan Guill wrote: Can someone tell me if my reply came through just a second ago? I got one of those body too long messages, but it doesnt tell me if my

RE: Query column index number

2005-11-02 Thread Ian Skinner
OR to remove the evaluate function call. cfoutput query=qry #qry[listGetAt(qry.columnlist,2)]# /cfoutout That would be great, if it worked. Query objects cannot be accessed like structures. Query columns can (qry.col[row]), but not the query itself. Throws a Complex object types

RE: Query column index number

2005-11-02 Thread Justin D. Scott
Sorry, that's what I get for suggestion code without testing it. If one uses array notation, they must note complete, column and row. This works as test on 6.1. Should also work on 7, but I have not upgrade my workstation yet. All three methods output the same value from my test

RE: Query column index number

2005-11-02 Thread Steve Milburn
Ryan Thank you. I think I will be able to build a workable solution with your code. Thanks again. -Original Message- From: Ryan Guill [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 02, 2005 3:04 PM To: CF-Talk Subject: Re: Query column index number forgive me

Re: Query column index number

2005-11-02 Thread Ryan Guill
code. Thanks again. -Original Message- From: Ryan Guill [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 02, 2005 3:04 PM To: CF-Talk Subject: Re: Query column index number forgive me for not modifying this to show you only exactly what you need, but the following will show you