• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfhttp - Need column names

Guest
Feb 06, 2008 Feb 06, 2008

Copy link to clipboard

Copied

Hi,

I'm pulling a .csv file using cfhttp. Getting the file is no problem. Is there an easy way to get to the names of the columns? Below is the cfdump: I'm trying to get to BRAND, PROD_DESCRIPTION, and UPC quickly. (I can use a loop and extract, just looking for something quicker if it exists). Like cfhttp.columnname?

query
BRAND PROD_DESCRIPTION UPC
1 Kraft Kraft Macaroni & Cheese 6oz 55555-01001
2 Kraft [empty string] 55555-01007
3 Post Kraft Spirals & Cheese 7oz 55555-01002

If there is an easy way to get to a particular address other than looping i.e. [column name][row number] I'd be interested in hearing those thoughts.

Thanks!

cfwild
TOPICS
Advanced techniques

Views

270

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 06, 2008 Feb 06, 2008

Copy link to clipboard

Copied

LATEST
Use the name attribute of cfhttp to create a query. Play around with the columns attribute. If you leave it out, the column headers of your file might become your columnlist.

Details are in the cfml reference manual for cfhttp. If you don't have one, the internet does.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation