Getting metadata from results of select

admin

Administrator
Staff member
I am developing a generic PHP driven report engine, that has report definitions in a database, that allows for a simple mechanism for adding new reports.

I would like to have the ability to add a generic select statement into the report definition database. Upon executing the report, I want to read the select statement, combine it with active context variables, and then issue the select onto the database.

My problem is, I don't necessarily know what the fields are that are coming back in the resultset from mysql_query(). Is there any way to identify the metadata from the results of the query? I know how to identify the number of rows [mysql_num_rows()], but I don't know how to identify the fields, and their types.

Does anyone know how to identify the field metadata from mysql_select?

Thanks for your help in advance,

Charlie Peppler
<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->
 
Back
Top