SYNOPSIS

\*(T<#include <opendbx/api.h>\*(T>

\*(T<int odbx_column_count\*(T> \kx \*(T<(odbx_result_t* result);\*(T>

DESCRIPTION

Returns the number of columns which belongs to the current result set allocated by \*(T<odbx_result\*(T>(). The number will never change within a result set with one notable exception: MySQL returns all outstanding rows of a previous result set first if they were not fetched completely by \*(T<odbx_row_fetch\*(T>() before. Therefore, the column count might change in this special situation. It is strongly advised to fetch all rows of a result set before calling \*(T<odbx_result\*(T>() again because other backends will return an error in this case.

The \*(T<result\*(T> parameter required by this function must be a valid result set returned by \*(T<odbx_result\*(T>() and must not has been feed to \*(T<odbx_result_finish\*(T>() before.

RETURN VALUE

\*(T<odbx_column_count\*(T>() returns the number of columns/fields which are available in the current result set. The value depends on the column list being part of the SELECT query and it is zero if the query wasn't a SELECT-like query.

ERRORS

This function will also return zero if the \*(T<result\*(T> parameter is invalid.

RELATED TO odbx_column_count…

\*(T<odbx_column_name\*(T>(), \*(T<odbx_column_type\*(T>(), \*(T<odbx_result\*(T>()