[thelist] Quick ColdFusion / SQL question

jon steele jjsteele22 at yahoo.com
Thu May 3 17:27:46 CDT 2001


I need a way to select the *field* name of a table based on data in
it...for example if this was a table (with fieldXXX, etc. being names
of columns):

-fieldXXX-  -fieldYYY-   -fieldZZZ-
    1           2            4

I need to get the value "fieldZZZ" when knowing 4....so kinda like
selecting the column name based on data in it (the data in the first
row to be exact). Does this make sense? The reason is that the field
names are created dynamically.

If the above can't be done, I could go a more complex way. I have a way
of getting all column headers in an array (a technique which I reuse in
my app). Could this be of help in achieving my goal?

I've been on this for a while...I just can't seem to get it (seemed
simple at first).


Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices

More information about the thelist mailing list