Getting Field Names in Microsoft SQL
| From: | R.S. Herhuth | Date: | Fri, 16 Aug 2002 07:07:08 +0000 |
| Subject: | Getting Field Names in Microsoft SQL | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-15312@lists.php.net to get a copy of this message | ||
I'm trying to build a dynamic script that basically extracts all of the
fields in a MS SQL database...I just can't seem to figure out how to get
at the field names themselves. I am using the mssql_fetch_array
followed by the $row['field_name'] in an array. But I would like to
make the field_name dynamic (i.e. not knowing the field_names ahead of
time) which would make the script adaptable to any table in the
database. So if I get the field's value by $row['field_name'] how do I
get at the field's name?
thanks,
Ron