Hi, I would like to return the field names from the database as well as the results... how do return fields names? i.e. what is the syntax? I am connecting to a mssql database using ADODB_FETCH_ASSOC Thanks
This is a command for mysql not sql server.. Sql Throws UP Msg 156, Level 15, State 1, Line 1 Incorrect syntax near the keyword 'FROM'.
Are you looking for the query to return field names? From the way I understood the question you arent. If you are ignore the rest... Your query should return an array of variables the keys for those variables with ADODB_FETCH_ASSOC should be the field names for ($resultsArray as $key=>$value){ echo "Field name: $key --- Value: $value"; }