qdb_columns()

Return the number of columns in a result

Synopsis:

#include <qdb/qdb.h>

int qdb_columns(qdb_result_t *res);

Arguments:

res
A pointer a result structure to check.

Library:

qdb

Description:

This function returns the number of columns in the result structure res. If your query matches 0 rows, you can still have a value greater than 0 for the number of columns. You should use qdb_rows() to determine if the results are empty.

Returns:

>-1
The number of columns in the result set.
-1
An error occurred (errno is set).

Classification:

QNX Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

qdb_column_index(), qdb_column_name()