MYSQL_RES * mysql_stmt_result_metadata(MYSQL_STMT * stmt);stmt - a statement handle, which was previously allocated by mysql_stmt_init().
If a statement passed to is one that produces a result set, mysql_stmt_result_metadata() returns the result set that can be used to process the meta information such as the total number of fields and individual field information.