1odbx_column_count(3)                OpenDBX               odbx_column_count(3)
2
3
4

NAME

6       odbx_column_count - Get the number of columns in the current result set
7

SYNOPSIS

9       #include <opendbx/api.h>
10
11
12       int odbx_column_count (odbx_result_t* result);
13

DESCRIPTION

15       Returns  the  number of columns which belongs to the current result set
16       allocated by odbx_result(). The number will never change within  a  re‐
17       sult set with one notable exception: MySQL returns all outstanding rows
18       of a previous result set first if they were not fetched  completely  by
19       odbx_row_fetch()  before.  Therefore,  the column count might change in
20       this special situation. It is strongly advised to fetch all rows  of  a
21       result  set  before  calling odbx_result() again because other backends
22       will return an error in this case.
23
24       The result parameter required by this function must be a  valid  result
25       set  returned  by  odbx_result() and must not has been feed to odbx_re‐
26       sult_finish() before.
27

RETURN VALUE

29       odbx_column_count() returns the  number  of  columns/fields  which  are
30       available  in  the  current result set. The value depends on the column
31       list being part of the SELECT query and it is zero if the query  wasn't
32       a SELECT-like query.
33

ERRORS

35       This function will also return zero if the result parameter is invalid.
36

SEE ALSO

38       odbx_column_name(), odbx_column_type(), odbx_result()
39
40
41
42                                 28 July 2020             odbx_column_count(3)
Impressum