'\" -*- coding: us-ascii -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH odbx_column_count 3 "5 September 2014" "" OpenDBX .SH NAME odbx_column_count \- Get the number of columns in the current result set .SH SYNOPSIS 'nh .nf \*(T<#include \*(T> .fi .sp 1 .PP .fi .ad l \*(T \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu \*(T<(odbx_result_t* \fIresult\fR);\*(T> 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION Returns the number of columns which belongs to the current result set allocated by \*(T<\fBodbx_result\fR\*(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<\fBodbx_row_fetch\fR\*(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<\fBodbx_result\fR\*(T>() again because other backends will return an error in this case. .PP The \*(T parameter required by this function must be a valid result set returned by \*(T<\fBodbx_result\fR\*(T>() and must not has been feed to \*(T<\fBodbx_result_finish\fR\*(T>() before. .SH "RETURN VALUE" \*(T<\fBodbx_column_count\fR\*(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. .SH ERRORS This function will also return zero if the \*(T parameter is invalid. .SH "SEE ALSO" \*(T<\fBodbx_column_name\fR\*(T>(), \*(T<\fBodbx_column_type\fR\*(T>(), \*(T<\fBodbx_result\fR\*(T>()