Hey guys,
I want to retrieve all the field names from a mysql table and store them as an array. I have tried using mysql_field_name but it requires an offset value. This offset value can be determined by mysql_field_num, then I can run a loop and store in array.
But rather than doing that I want to know if there is a way that I can just retrieve the field names and store them as an array.
For example, when you execute "SELECT * from TABLE" you are able to use mysql_fetch_array to get the certain information inside the fields. I have tried using "SHOW FIELDS from Table" but it does not get the field names but rather it gets column headings for my mysql table.
I do not wish to run a loop just to build an array, there has to be a better way of approaching this.
Thank you for your time.