Getting the NumberofColumns in a resultset
So I have a query that creates a table of the data after it is submitted, but the results are dependent upon which SELECT fields the user selects via a checkbox.
Example:
I have 3 checkboxes for 3 different fields in the query: Name, Number, Address. If the user only checks Name and Number, then the SELECT query will be SELECT firstName, number FROM tableofinfo.
So, the resulting table for the results can either be 1, 2 or 3 columns (depending on how many checkboxes they check). My question is, how can I pull the number of fields or columns that the table resulted in so that I can use that for further manipulation? So, for the example it would be 2 (Name and Number). I have the result="resultInfo" set on the <cfquery> tag, and I know that #resultInfo.RecordCount# will give me the number of rows, but I want the number of columns. Is this possible?
Thanks
