pg_numfields

(PHP 3 <= 3.0.18, PHP 4 >= 4.0.0)

pg_numfields -- Returns the number of fields

Description

int pg_numfields (resource result)

pg_numfields() returns the number of fields (columns) in a PostgreSQL result. The argument is a result resource returned by pg_exec(). This function will return -1 on error.

See also pg_numrows() and pg_cmdtuples().