Updated on 2025-03-13 GMT+08:00

PQnfields

Description

Returns the number of columns (fields) in each row of the query result.

Prototype

int PQnfields(const PGresult* res);

Parameters

Table 1 PQnfields parameters

Keyword

Description

res

Handle to the operation result.

Return Values

Value of the int type