Skip to main content
August 27, 2009
Question

retrieve the fields name of a table

  • August 27, 2009
  • 1 reply
  • 971 views

HI,

I need to write a loop to get the name of each fields in a table. I nedd something like

for each field.fieldname do something

thanks,

Mandana

This topic has been closed for replies.

1 reply

Inspiring
August 28, 2009

select * from yourtable where 1 = 2

The resulting columnlist will give you all the field names.

Inspiring
August 28, 2009

A better approach might be to use <cfdbinfo>.

--

Adam

August 28, 2009

Thanks. It worked for me.