opc0de
opc0de

Reputation: 11768

Count columns of select PostgreSQL

I am doing a select on a table I know how many results I have using

PQntuples()

function . But how can I get the number of columns? Is there any function for that?

Upvotes: 0

Views: 305

Answers (1)

araqnid
araqnid

Reputation: 133662

Yes, PQnfields(const PGresult*) - http://www.postgresql.org/docs/current/static/libpq-exec.html

Upvotes: 1

Related Questions